Mobile app version of vmapp.org
Login or Join
Shakeerah625

: What is the most efficient (size-wise) lossless format to store 2 bit color depth indexed image, preferably in Gimp? Using Gimp, I reduced an image to 4-colors indexed mode. I actually need

@Shakeerah625

Posted in: #ColorIndexing #FileConversion #FileFormat #FileSize

Using Gimp, I reduced an image to 4-colors indexed mode.

I actually need only 3 colors: black, blue and white/background, but due to the 2^n constraint I went for black, white and 2 shades of blue.

I did that in order to reduce file size as much as possible.

Now the question is what is the best lossless format to save this file in, that results in minimal file size?

Again - I'm using Gimp.

Edit:

Especially, I'd be glad to find a file format that takes advantage of this reduced color depth. I assume that PNG and GIF, being general formats, do not take advantage of it. Am I wrong?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah625

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley460

Lossy format exist due to either large color information or large pixel quantity, or both.

JPEG for example, compresses most of the color information in clusters so it shrinks the file size in sacrifice of quality.

If you have just 4 colors in your index, you can achieve a very tiny file size with either PNG or GIF, since both can rely on indexes to reduce their sizes.

Which one may depend on your purpose, for really fast loading, GIF would be your guy. But if you want optimize file size, PNG has compression and will save further bits, but it will demand you some microseconds to decompress it, what shouldn't be an issue.

10% popularity Vote Up Vote Down


 

@Goswami567

GIF and PNG are both lossless, the 'best' format to use will depend on the actual content of your graphics. Different styles of illustration and levels of detail will compress differently. Try both and see how you get on.

Speed of decompression may be an issue, especially for web use. Again, you may need to experiment. There is a good article about PNG compression here: www.howtogeek.com/203979/is-the-png-format-lossless-since-it-has-a-compression-parameter/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme