Apache OpenOffice (AOO) Bugzilla – Issue 87410
Export to grayscaled jpeg uses 24 Bit instead of 8 Bit
Last modified: 2017-05-20 10:24:06 UTC
Take a draw document with a colored object for example a rectangle with gradient filling. Select the object > file > export. Choose file format "JPEG" and "Selection". In export dialog choose quality "100" and color resolution "Grayscale". Export. Now open the picture with any program that shows picture properties, for example IrfanView. You will see, that it is 24 Bit per pixel. The colors are gray but the color space is still RGB. A grayscaled JPEG should use 8 Bit per pixel only.
Confirmed with OOo 2.3.1 WinXP PC. Greyscale export saved as 24bpp rather than 8bpp.
Can confirm this with OOo 2.4-dev on Win2k. OOo Draw seems to export the jpg-image as RGB/YCbCr triplets, instead of saving just the luminance component (Y). 1.) The space savings from getting rid of the near-empty chroma channels (Cb and Cr) won't be large; but the decoding time for a grayscale JPEG is substantially less than that for a color JPEG. 2.) The bigger problem stems from the fact that the resulting "grayscale" image is actually a 24-bit RGB image, so editing it in another application results in RGB-editing. This may not pose a serious problem if one draws a red line on the image, as the user will notice that something went wrong, but it may be a problem when applying filters and various transforms. TRUE colours may be produced in this latter situation, yet the unsuspecting user may easily miss this fact. As the 2 chroma components are 0 (Cb = Cr = 0) in a grayscale image, the luminance (Y) is basically identical with the R/G/B values (when scaled to 255; Y = R = G = B). This should be relatively easy to fix. [The chroma components are scaled to 255 for true 24-bit RGB images, so they would become 128 rather than 0.]
I can reproduce the bug in dev300m3.
keyword: performance
This issue has been fixed in cws[impress181] for OOo 3.3
sj->wg: this issue is ready to be verified in cws[impress181]
Verified in CWS.