: Saving an 8-bit grayscale image as a 2-bit image 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
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?
More posts by @Sarah814
2 Comments
Sorted by latest first Latest Oldest Best
Photoshop allows downsampling to an arbitrary number of colors -- but it will be saved in the image's native color mode (RGB, or at least as Indexed color).
The PNG file format allows 2-bit grayscale, and in Photoshop's Save For Web dialog you can set the maximum number of allowed colors. I'd have to test if Photoshop indeed creates a 2-bit grayscale, though, as it seems to prefer saving as a simple palettized image instead.
See also How do I convert image to 2-bit per pixel, which suggests ImageMagick.
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 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 otake.com.mx/Foros/CGA-Test-Drive_1.png
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
otake.com.mx/Foros/XinXin-01-GrayScale.png
2) Linear conversion. This just makes from the 50% gray to white complete white and the rest pure black.
otake.com.mx/Foros/XinXin-02-50Threshold.png
3) But you can control what do you want black or white playing with curves before conversion.
otake.com.mx/Foros/XinXin-03-ControledThreshold.png
4) Dither. This kind of pattern are used in digital printers, inkjet printers and can be used in some high end commercial printing.
otake.com.mx/Foros/XinXin-04-Dithered.png
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.
otake.com.mx/Foros/XinXin-05-Postcript.png
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.