Bit Depth troubles

Jones
Unregistered
 
Post: #1
It's one number. It can be represented in 1 byte. Heck, if there was a data type for half a byte, it could probably be represented in that too. But it's hurting me. Rasp

I've got some images (png's, targa's and jpegs) to test my texture classes.

I had forgotten which bit depth I'd saved one certain png as. (8 and 16 are obvious, but I can't visually tell the difference between 24 and 32, of course.) So I open it in preview, and preview tells me it has a bit depth of 8. Heh... no, because it's full color, and I'm pretty sure it's 32 or 24. Graphic Convertor tells me it's 32.

So I pass the png to FreeImage without any conversions. And *it* says it's 24 bits per pixel... hmm. So I ask it to convert it to 32bit. It does, and I adjust the OpenGL components number accordingly, but it renders all messed up.

I know that there is a performance boost from using 32bit textures, so I'd rather do that. But I could've sworn I told photoshop to save it as 32bit, and grapic convertor seems to think it's 32 bit also.

What's goin on? Blink
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #2
A 32 bits image has 24 bits of color information (8 for each component, RGB) and 8 bits of alpha information (transparency) per pixel.
Quote this message in a reply
Jones
Unregistered
 
Post: #3
PowerMacX Wrote:A 32 bits image has 24 bits of color information (8 for each component, RGB) and 8 bits of alpha information (transparency) per pixel.

I suppose that's what FreeImage passed to me, but I'm not sure I read it does that anywhere in the docs.

Thanks, anyways!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL install troubles m3the01 3 3,426 Feb 20, 2009 12:46 PM
Last Post: DaveJ
  Golden Oldie: Fullscreen troubles Fenris 4 3,255 Jul 27, 2006 02:42 PM
Last Post: Fenris
  Troubles compiling... InflamedSpirit 11 5,033 Jul 2, 2005 08:41 AM
Last Post: Malarkey
  Material Troubles Nick 2 2,708 Apr 12, 2005 06:39 AM
Last Post: Nick
  Fullscreen troubles (Cocoa) DJBlufire 5 3,405 Dec 12, 2003 11:36 PM
Last Post: kelvin