Alley in Pisa, Italy

by Lars Kotthoff

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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