.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old March 5th, 2010, 12:39 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default 32 bit Bitmaps

What purpose, exactly, does a 32 bit Bitmap file serve? There are only 24 possible bits of color in the format (8 each of RGB).. Is there some weird CMYK bitmap format that is commonly created with the same .bmp extension?
Reply With Quote
  #2  
Old March 6th, 2010, 08:10 AM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default Re: 32 bit Bitmaps

An alpha channel (for transparency) may be stored in a separate file, where it is similar to a grayscale image, or in a fourth channel that converts 24-bit images to 32 bits per pixel. en.wikipedia.org : BMP_file_format
Reply With Quote
  #3  
Old March 7th, 2010, 12:24 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: 32 bit Bitmaps

I know of Microsoft's DIB insanity... but does anyone else actually use 32 bit bitmaps in the real world?
Reply With Quote
  #4  
Old March 7th, 2010, 09:54 PM

Baron Munchausen Baron Munchausen is offline
General
 
Join Date: Aug 2000
Location: Ohio, USA
Posts: 4,323
Thanks: 0
Thanked 0 Times in 0 Posts
Baron Munchausen is on a distinguished road
Default Re: 32 bit Bitmaps

32-bit is not about the color. It's about the data format. Computers us binary math, remember. Doing any sort of calculation in powers of two is much, much faster for a computer than working in other numeric system. So 32-bit images are faster for computers to handle than 24-bit images. The colors are the same.
Reply With Quote
  #5  
Old March 8th, 2010, 01:12 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: 32 bit Bitmaps

That sounds like premature optimization to me.

Zero-padding the raw data is surely going to increase load times by increasing I/O operations to load from disk. The shift operations necessary to extract the proper parts of each 32 or 64 bit chunk of raw data to get the color values for each pixel are orders of magnitude faster than reading 33% more data from disk.

Once the data is loaded, it will be stored in program memory in exactly the same way, regardless of whether it has to be pieced together from multiple raw chunks or whether each raw chunk is one (or two on 64-bit cpus) full pixel.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.