When converting a color JPG image to grayscale, and saving it back to JPG, one can usually see at least 20% file size reduction, which seems natural.
Question:
Is there a specific "grayscale" format in the JPG specifications? I see this in the JPEG File Interchange Format, but not sure if it's the standard used nowadays
Or is a "grayscale JPG" just usually a color RGB JPG where
R = G = B
, and thus the file size reduction results from a compression of 3-times-duplicated numbers?
It seemed to me that it's 2. because in various languages, JPG export functions don't have a grayscale option, for example toDataURL
in Javascript:
var fullQuality = canvas.toDataURL('image/jpeg', 1.0);
var mediumQuality = canvas.toDataURL('image/jpeg', 0.5);
var lowQuality = canvas.toDataURL('image/jpeg', 0.1);