Issue 87410 - Export to grayscaled jpeg uses 24 Bit instead of 8 Bit
Summary: Export to grayscaled jpeg uses 24 Bit instead of 8 Bit
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.4 RC6
Hardware: All Windows XP
: P4 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2008-03-25 13:18 UTC by Regina Henschel
Modified: 2017-05-20 10:24 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2008-03-25 13:18:28 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.
Comment 1 ace_dent 2008-03-26 01:45:30 UTC
Confirmed with OOo 2.3.1 WinXP PC.
Greyscale export saved as 24bpp rather than 8bpp.
Comment 2 discoleo 2008-03-26 19:47:34 UTC
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.]
Comment 3 christian.guenther 2008-03-27 12:46:32 UTC
I can reproduce the bug in dev300m3.
Comment 4 ace_dent 2009-10-06 14:25:04 UTC
keyword: performance
Comment 5 sven.jacobi 2009-12-21 16:46:42 UTC
This issue has been fixed in cws[impress181] for OOo 3.3
Comment 6 sven.jacobi 2010-01-08 14:21:19 UTC
sj->wg: this issue is ready to be verified in cws[impress181]
Comment 7 wolframgarten 2010-01-13 13:30:04 UTC
Verified in CWS.