0
votes

I'm invoking the following command to convert an input jpeg that I know is sRGB 3-channel into a single-channel gray image as follows:

convert my-sRGB.jpg -grayscale Rec601Luma my-8bit-gray.jpg

When I run identify on my-8-bit-gray.jpg, it is 8-bit grayscale. But the size is about the same as the input's.

I expected it to be roughly 1/3 of the original size. So, is there an option I need to plug in to make sure the output image is the reduced size?

Thanks, Charles

1
As I understand it, though not an expert, JPG does not have channels. It is all DCT compressed in 8x8 blocks whether color or gray.fmw42

1 Answers

0
votes

It's hard to say without seeing the files - and StackOverflow strips them down anyway, so I think you'd need to share the originals via Dropbox or Google Drive or similar to have any hope of an answer. It's possible that the expected size reduction is not happening because of some other factor - such as interlace or quality.

The JPEG standard does allow single channel images, see Section 6.1 of the ITU Spec. If you look here, you can see the number of components is encoded in the SOF0/SOF2 field.