TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Indexed Color images - file size

Page: 1 Reply
Feb 11th 2005#165648 Report
Member since: Feb 11th 2005
Posts: 3
Can anyone tell me why the size on disk of uncompressed indexed color images is always slightly larger than you expect it to be? For example, a 100x100 pixel image, 4 bit indexed image with a 2 color palette: the file size should be 5,000 bytes (4 bits for each of 10,000 pixels) plus 6 extra for the two colors in the CLUT - i.e. 5006 bytes. Yet the actual size is 5,268 - not a figure that squares with any size of palette! Ditto a 200x200 image, 8 bit colour: 40,000 bytes. Plus a full 256 colour CLUT at 3 bytes each, an extra 768. total size 40,768. on disk it is 41,080 bytes - an extra 112 bytes.

This is on a PC - not a Mac 'resource fork' issue. Is there some additional header info that Photoshop attaches to indexed color images - and if so, what is it?
Reply with Quote Reply
Feb 23rd 2005#166077 Report
Member since: Oct 26th 2004
Posts: 20
Is your GIF a GIF87a or GIF89a? I believe that the 89a version creates a slightly bigger version due to the addition of ability for transparency + text comments (it's sorta is still active, even if not in use).
Reply with Quote Reply
Feb 26th 2005#166174 Report
Member since: Feb 11th 2005
Posts: 3
[QUOTE=bluediva]Is your GIF a GIF87a or GIF89a? I believe that the 89a version creates a slightly bigger version due to the addition of ability for transparency + text comments (it's sorta is still active, even if not in use).[/QUOTE]
No, this is uncompressed 8 bit (or less) bmp format, before gif compression. Raw 24 bit bmp files are the size you'd expect them to be (in Windows, and on Apple after removing the resource fork) by multiplying the number of pixels by the color depth. For indexed color you should just have to add 3 bytes for every color in the CLUT - but the files come out bigger. Not much, I know - and gif compression will presumably sort it out - but it's a bugbear!
Reply with Quote Reply
Feb 26th 2005#166189 Report
Member since: Feb 24th 2005
Posts: 159
hmmm, not to make too light of this... but really: What's a couple hundred bytes?

Just looking at it, your math is correct. I'm not sure what additional info PS is stuffing into the file but it must be something.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum