Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
256-color-indexed(png|gif): missing transparency
#2
The people who give technical answers here are essentially the same as the ones who give them on GC, so you'll get the same answers.

To make it short, in a GIF, there is a color designated as the transparent color, so if you want transparency, you are limited to 255 visible colors.

To quote Wikipedia:
Quote:GIF is palette-based: the colors used in an image (a frame) in the file have their RGB values defined in a palette table that can hold up to 256 entries, and the data for the image refer to the colors by their indices (0–255) in the palette table. The color definitions in the palette can be drawn from a color space of millions of shades (224 shades, 8 bits for each primary), but the maximum number of colors a frame can use is 256. This limitation seemed reasonable when GIF was developed because few people could afford the hardware to display more colors simultaneously. Simple graphics, line drawings, cartoons, and grey-scale photographs typically need fewer than 256 colors.

Each frame can designate one index as a "transparent background color": any pixel assigned this index takes on the color of the pixel in the same position from the background, which may have been determined by a previous frame of animation.
(emphasis mine).


This is what ImageMagick's identify command reports about your second image:

.zip   oscillating_i256tran-forum-crop.zip (Size: 25.39 KB / Downloads: 208) .
This is image doesn't come from Gimp since it seems to have different colormaps per frame.

The first frame has no transparent colors (the designated transparent color is black, but there is no black in the colormap). Most others frames have a transparent color that matches one in the color map.

You'll also notice that the frame with the most colors only has 253 colors, so you are likely wasting your time/effort.

GIF is limited, it dates back to 1989, well before JPEG, PNG, WEBP and MP4 were invented, and at a time where a display that could display 24M colors was the price of a small car, and enterprise networks ran at the blazing speed of 19600 baud.
Reply


Messages In This Thread
RE: 256-color-indexed(png|gif): missing transparency - by Ofnuts - 08-20-2020, 12:20 AM

Forum Jump: