0
$\begingroup$

I want to create an animated GIF, but instead of 8-bit 256 colours, my data is comprised of binary bitmaps of black/white pixels.

Can GIF accommodate this, or are pixels in GIF always 8-bit indices?

I need the resulting GIF to be small in size, so I cannot afford to waste 7 of the 8 bits.

If GIF does not support this, is there any other file format that would allow me to do this?

I believe that TIFF supports 1-bit images, but I've never seen an animated TIFF file.

$\endgroup$
2
  • 1
    $\begingroup$ "I need the resulting GIF to be small in size, so I cannot afford to waste 7 of the 8 bits." What makes you think that is what would happen? GIF uses compression, not just paletting. Maybe you should compress your image with GIF and see if it is "too big" for you. $\endgroup$ Jul 27, 2022 at 16:55
  • $\begingroup$ It's been a very long time (cough ~35 years) since I was experimenting with writing a GIF compressor, but IIRC, if the colour table has between 2^(N-1)+1 and 2^N entries, then I think it will initially use N bits to index into that table (and gradually increase as it builds up strings of symbols). ... but take with a grain of salt. $\endgroup$
    – Simon F
    Sep 5, 2022 at 9:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.