3

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?

3

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.

  • Any indexed color format, Like PNG or Gif can do 2 bits. but like you i suspec OP means 1bit color – joojaa May 15 '15 at 3:48
  • 1
    I'm reading some technical issues. Yeap It sems it is alowed 2 bit pixel on png formats. I'm editing a little the response. I'll post the reference. – Rafael May 15 '15 at 5:08
  • Mark, thanks for the editing. :o) I´ll just change back the word bit, instead of byte. In color depth the correct unit is bit. – Rafael May 15 '15 at 5:10
  • 1
    Nice answer Rafael! – Yisela May 15 '15 at 12:09
  • 1
    @DummyBeginner yes indeed they do. usually they are limitted to max 256 color tables to avoid using more than one byte indexes – joojaa May 24 '15 at 5:20
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.