Saving an 8-bit grayscale image as a 2-bit image


Question

Assuming there's an 8-bit grayscale image; what's the simplest method to save it as a "2-bit per pixel" image? Is it a binary image or something else (like a colormap image)? In the case of binary, what would happen to the second bit which will be useless, I guess.

Or it would be simply a 2-bit grayscale image? Does such a format even exist or is it only possible to use either binary format or 8-bit format for non-colored images?

1
3
5/15/2015 6:19:00 AM

2 bit images

2 bit images are not 2 color images.

2 bits would store 4 colors. Currently the png file format allow several bit depths http://www.w3.org/TR/PNG/#11IHDR.

Some good years ago the CGA color mode for monitors displayed a Cyan Magenta Black and White images. Those were 2 bit images.

Test Drive game screen capture

You could convert them to Red Green Black and Yellow. That was awesome!.

You can simulate a 2 bit image reducing a palette from an 8 bit image.

One technical issue I am not sure is if the current comercial software actually uses thoose bit depth or just use an 8 bit format with a croped palete.

1 bit images

This days the file formats can be 1 bit and jump to 8 bit images.

1 bit images are used all the time in a commercial print but as a part of a process. Your normal CMYK file or grayscale image is converted into a 1 bit image just before making the plates.

A image printed in a black and white laser printer can be considered also a 1 bit image at some point, for example.

And images for T-shirts for example, or cuted on vinyl, can also be 1 bit images. Think of the classic Che Guevara image.

Conversion

There is no simple method. You need to make choices before converting it.

Here are some examples:

1) Base image

2) Linear conversion. This just makes from the 50% gray to white complete white and the rest pure black.

3) But you can control what do you want black or white playing with curves before conversion.

4) Dither. This kind of pattern are used in digital printers, inkjet printers and can be used in some high end commercial printing.

5) And this is the typical postscript pattern used in most commercial printing. (I used a grayscale image after the B/N conversion so the image look better on screen.

3
4/19/2019 8:53:00 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
^