4 ms·
GIF is not lossless. It reduces the pallette to 256 colors. From your normal 16.7 million colors for 8-bit videos or images.
by bufferoverflow 2y ago
GIF is not lossless. It reduces the pallette to 256 colors. From your normal 16.7 million colors for 8-bit videos or images.
- defrost 2y agoAs a little known quirk of history: a statement that the GIF image file format is limited to 256 colors is simply false. https://web.archive.org/web/20140908023322/http://phil.ipal.org/tc.html https://web.archive.org/web/20140908023322/http://phil.ipal.... How is pretty sneaky.
- afavour 2y agoWow, that’s fascinating. I have a tiny macOS app that makes GIFs that I use for screen recordings, it has occurred to me before now that it produces surprisingly good quality images with no visible dithering, I wonder if it’s doing this. (still feels very stupid to have to do it but until Google Docs lets you embed a silent auto playing mp4…)
- donatj 2y agoBy that definition 24-bit image is "lossy" to 32-bit images, and 32-bit images lossy to 64-bit images ad infinitum and lossless formats don't exist. A gif is lossless in that it does not lose data. When you define a frame within the formats limitations, you will always receive that exact frame in return. The conversion might have lost data but that's not the gif losing it. That's just what happens trying to fit a larger domain in a smaller domain. The individual frames within a gif are bitmaps that do not lose detail across saves, extractions, rotations, etc. Each individual pixel is displayed exactly as originally defined. Compare this to JPEG or MP4 where your individual pixel becomes part of a larger cosine field. There is no guarantee this pixel will exist and even if it does, its exact value is almost certainly changed. This is what "lossy" is.
- bufferoverflow 2y ago> By that definition 24-bit image is "lossy" to 32-bit images, and 32-bit images lossy to 64-bit images Only assuming your base images have that many bits of information. Most cameras max out at 16 bits per channel when shooting RAW, and even those rarely have mostly noise in the lower bits. I'm sure you can find an example of some supercooled telescope sensor that actually does capture 16 bits per channel, maybe even more. In the real world your image source is usually either JPG (24 bits per pixel, already debayered and already lossy) or RAW (16 bits per pixel max, bayered).
- PaulHoule 2y agoIn realistic scenes dynamic range is more important than precision. That is you can frequently find things that are many orders of magnitude brighter than each other and proper representation involves lots of bits and using them properly.