Assembly Hacks

Aug 10, 2008 at 3:31 AM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
RuneLancer said:
Each byte is a different component (Red Green Blue Unused.)
So, the fourth byte is definitely not an alpha channel?
 
Aug 10, 2008 at 11:47 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
odin 2128 said:
Just asking what type of hex editor do u use
All hex editors are the same thing. Some have extra fluff around them, but at their core they all just let you edit hex.

Celtic Minstrel said:
So, the fourth byte is definitely not an alpha channel?
Alpha channels have to be explicitely specified to be used. To apply one, a lot of extra work is required and if you're not going to use the alpha channel, you may as well leave it switched off or call functions that don't use it.

The value is still 32 bits instead of 24 bits in memory for one simple reason: your computer has instructions to work with 8, 16, and 32 bit values. To work with a 24 bit value (ie, just RGB without the alpha channel), it would have to do at least two operations (grab 8 bits from memory, then grab the next 16 bits) per pixel. By keeping the (useless) alpha channel, the image wastes a little bit of space but gets processed a lot faster (just one operation: grab 32 bits from memory. It's comparable to completing a shipment in one single trip with a big truck instead of in two trips with a smaller one.)

Note that on disk, you can store a pixel under any format. Disk access can be slow since it usually has to occure just once and then the image stays in memory.
 
Top