Gimp-Forum.net
Why does GIMP change the BPP ? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Why does GIMP change the BPP ? (/Thread-Why-does-GIMP-change-the-BPP)



Why does GIMP change the BPP ? - Mark2855 - 02-01-2022

Using GIMP 2.10.28, I opened 12 images, to make a GIF.
Each of the 12 pictures is 1920 x 1200 pixels, at 24 BPP.
When I export it as a GIF, the GIF ends up being only 8 BPP.
That makes it more pixelated / less clear.  
Why does it do that?  How to make it maintain the 24 BPP?
Thanks, people.
Mark2855


RE: Why does GIMP change the BPP ? - rich2005 - 02-01-2022

Are you sure of your definitions ?
A RGB image 24 bits per pixel (bpp) is 8 bits for each of R , G , B in each pixel and that is also the RGB format for the gif palette. In Gimp from the Gimp menu Image -> Precision that is the 8 bit setting and also what you are probably seeing top of the Gimp window.

Where it gets degraded is a gif is color indexed and uses a maximum of 256 colours. Many colours are lost. It is an old format, made for when computers / internet connections were much slower / screens smaller / graphic hardware limited.

8 bpp ? That would be some sort of greyscale image. Are your images greyscale ?

If nothing like that please give some more details of your procedures.

As a comment, 1920x1200 is a monster size for an animated gif. I just made one from frames pulled out of a video and 12 layers gif = 11 MB file size. For comparison the same frames in the modern .webp format = 0.8 MB


RE: Why does GIMP change the BPP ? - Mark2855 - 02-01-2022

Thanks for your reply, Rich.
No, I'm not sure of the terminology.
Irfanview says that each of the pictures IS 1920 x 1200 pixels, 24 BPP, about 300KB each.
Yes, Gimp > Image > Precision shows "8 bit integer" as well as "perceptual gamma (sRGB). I don't know what that means.
Not Grayscale... full color.
The output GIF file is 7.4MB.
I've never before heard of .WEBP file. Just looked it up.
Found some sample files. They simply look like Pictures.
Can a WEBP file do animated stuff, like a GIF?
What else can I tell you, to explain the problem?
Thanks.


RE: Why does GIMP change the BPP ? - Ofnuts - 02-01-2022

A GIF is color-indexed. There are 256 colors (max) in the picture, and each pixel is encoded as the index of its color in the "colormap". Since there are only 256 possible indices the pixels are encoded as an 8-bit byte. However each of these 256 colors can be any combination of 256 values of red, 256 values of green and 256 values of blue (so the 8-bit pixel value is mapped to a 24-bit color). So in the end the image may be 24BPP but is constrained to use only  256 colors among the 24M possible.

Color indexing yields grainy/pixellated pictures because there aren't enough colors available to represent smooth color transitions. There are also additional restrictions. See this for more information.

The WebP format can be used for animation, and remove most GIF restrictions (full color, lossy or lossless, partial opacity...). It is a fairly recent format which is well supported by browsers but server software doesn't always the WebP files as image types (including the one we use here, alas).


RE: Why does GIMP change the BPP ? - Mark2855 - 02-03-2022

Thanks for the reply, OfNuts, but you're talking above my level of comprehension.
I THINK you mean that each pixel must be only one of 256 possible colors. Yes?
That's OK. I'll work with it. Thanks, people.


RE: Why does GIMP change the BPP ? - Ofnuts - 02-03-2022

(02-03-2022, 12:33 AM)Mark2855 Wrote: Thanks for the reply, OfNuts, but you're talking above my level of comprehension.
I THINK you mean that each pixel must be only one of 256 possible colors.  Yes?

Exactly. See https://www.gimp-forum.net/Thread-What-are-color-indexed-images-a-k-a-Why-are-my-colors-all-wrong