I think the answer is no, so I guess what I'm really looking for is an explanation. It seems as though with every library and tool I've tried for converting images, even when all of the pixels are black or white, the image is still 8-bit. Could someone kindly explain?


It depends what you mean by JPEG. Commonly, we're talking about JFIF/EXIF image file formats, which specify either one or three bytes per pixel (regardless of the colour space mapping those bytes to bits). Create a file that actually has only two discrete levels present, and it's no longer a JFIF/EXIF file. (And since throwing out high frequency information is the basis for JPEG compression, and all tonal changes in a bitonal image are by definition high frequency transitions, JPEG is a pessimal solution.)

For pure bitonal images using a JPEG-like compression, you'd need to be using JBIG or JBIG2, a format essentially for fax (and not commonly readable). A paletted solution that uses DEFLATE-style compression (redundancy mapping + Huffman or LZW-style bit reduction), such as PNG would be a better solution for most applications, however, since the position (and not merely the distribution) of the bits in the reconstructed image is guaranteed.


A 1-bit image would be like an ink blot. Each pixel would be totally black or totally white with no in between. An 8-bit B&W image allows for each pixel to be one of 256 shades including pure black, pure white and 254 shades of gray in between. Old newspaper photos used a primitive form of dithering to fool the eyes into thinking black dots on white paper were various shades of gray. But the images they were produced from had a much higher tonal range, and the result was a much lower resolution image than the original.

  • Thanks Michael. I get why you wouldn't want to do it...but that's what I'm dealing with; the spec I'm working against says '1-bit bitonal JPEG'. Here is a sample of my output princeton.edu/~jstroop/bitonal.jpg (scaled down) and it's dithered sort of as you describe, but still 8 bit; I'd like to make it 1-bit if possible, but it seems as though I need a bitmap format to do that, and that it's not possible with JPEG. This is all I'm trying to confirm. – JStroop Jun 21 '13 at 14:33
  • JPEG is a bitmap format but it's 8-bit per pixel per channel. – James Snell Jun 22 '13 at 21:44
  • FYI - JPEG2000 part 6 has options for bitonal content mixed with graduated tonal elements. – James Snell Jun 22 '13 at 21:46

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.