Thread: 32 bit Bitmaps
View Single Post
  #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