anxcon opened this issue on May 30, 2006 · 11 posts
anxcon posted Tue, 30 May 2006 at 6:59 PM
of so....
bmp files save as 24 bit (8 bits per for R G B)
jpg is 32 bit (R G B and alpha)
unless i'm farther off than i think :P anyways
once a texture is loaded, say jpg, then wouldn't it use more memory per pixel than bmp?
so jpg uses 1024x1024x32=4mb and bmp 1024x1024x24=3mb?
if i'm not insanely far off track so far, then a format saving 8 bits per pixel would be
1024x1024x8=1mb, and be better use for when i make my bump maps, correct?
since they are just greyscale, R=G=B, which is accually a waste of room
so if i'm not crazy :P whats a file format thats just 8 bits of info?
reason i ask, is i'm making a map 8192x8192 for a poster :) 64mb vs 256mb o_o hmm
Miss Nancy posted Tue, 30 May 2006 at 8:20 PM
in poser, the jpeg texmap uses 4 bytes per pixel AFAIK. hence a 4096X4096 map uses 64 MB of RAM.
RubiconDigital posted Tue, 30 May 2006 at 8:42 PM
Jpegs and bmp format images don't support alpha channels and are 24 bit images.
anxcon posted Tue, 30 May 2006 at 8:45 PM
ah thought jpg had 32 bit ;x oops
and back to my point
a format with 8 bits would stay 8 bits in memory? and what format is 8 bits?:)
pleonastic posted Tue, 30 May 2006 at 8:54 PM
gif is 8-bits.
Medzinatar posted Tue, 30 May 2006 at 8:56 PM
BMP can be 1, 4, 8 or 24 bits. The color depth is stored in the first 3 bytes of the file and of course, your viewing program must be able to recognize that (most do)
JPEG also supports an 8 bit format
RubiconDigital posted Tue, 30 May 2006 at 9:16 PM
Technically, all so called true colour images are 8 bit. It depends on whether you're counting the total bits or bits per colour channel.
A true colour jpeg, for example, is commonly called a 24 bit image, because it has 8 bits of colour information each for the red, green and blue channels. So, 8 bits per channel times 3 channels equals 24 bits. It can be confusing unless everyone in the conversation is using the same assumptions about what bits they're actually counting.
Let's call the true colour images you would normally want to use for textures 24 bit images. Image formats that fall into this category would be tif, bmp, tga, jpeg, png and quite a few others, but those are the most common ones. Note that the tif format (amongst others) supports alpha channels, which then takes it up to 32 bits, as the alpha channel occupies 8 bits.
And yes, if the image is 24 bit (what you're calling 8 bit), when you load it into memory, it will still be a 24 bit image.
Jimdoria posted Wed, 31 May 2006 at 9:57 AM
Also, it's my understanding that once a JPG is loaded into memory, it occupies exactly the same amount of space as a comparable BMP. To be viewed or rendered, the image must be decompressed into memory, so any reduction in size is lost. In other words, the JPEG compression only saves space in the file while it is on the disk.
tekn0m0nk posted Wed, 31 May 2006 at 10:11 AM
Yep its not just BMP or JPG but depends on what the native format of the renderer is. If a renderer uses 8 bit per channel (or 32 bit per pixel RGBA like many renderers do including Poser) then any and all texture files are converted to this when loading into RAM. It wont matter if your image is 8 bit or 24 bit or 32 bit they will all occupy the same space, depending only on their uncompressed resolution size. Some renderers like those of Lightwave and mentalray even use 32 bit per channel float images as native and in those renderers every pic actually gets upsampled to 128 bit images but they also have special methods to not load the whole pic at once and they can get by with much less RAM.
Rance01 posted Wed, 31 May 2006 at 6:18 PM
I thought Targa also could save an alpha channel? Seems like one of the old (2D) morphing programs I had saved output to Targa images that supported alpha. Could be wrong ...
Cool topic. -Rªnce
pleonastic posted Wed, 31 May 2006 at 6:29 PM
yes, you remember correctly; targa can also save an alpha channel.