Description: In spite of 4bit gray scale, color image exported. detail is following step and screencast. Steps to Reproduce: 1. open draw 2. set color object 3. file > export... -> popup Export diagram 4. set filename and file type to "BMP - Windows Bitmap" 5. press save button -> popup "BMP options" dialog 6. set Color Depth to "4bit grayscale" and OK --> export bitmap image, but bitmap image is color... Actual Results: export color image. Expected Results: export gray scale image Reproducible: Always User Profile Reset: Yes Additional Info: note: if step6, set Color Depth to "4bit Color" -> export gray scale image. i think 4bit color/grayscale is reverse. I confirm following version. Version: 7.0.0.2 Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c CPU threads: 4; OS:Linux 4.15; UI render: default; VCL: gtk3 Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP Calc: threaded
Created attachment 163757 [details] ScreenCast
Still haven't looked far enough, but the culprit is "plural"? https://opengrok.libreoffice.org/xref/core/svtools/source/filter/exportdialog.cxx?r=cf234676#251 https://opengrok.libreoffice.org/xref/core/vcl/source/filter/graphicfilter.cxx?r=0c600458#1895
wait, why didn't we have an item for 1 bit dithered? https://opengrok.libreoffice.org/xref/core/officecfg/registry/schema/org/openoffice/Office/Common.xcs?r=b54f7fd9#4212 https://opengrok.libreoffice.org/xref/core/include/vcl/bitmap.hxx?r=29dc1029&fi=BmpConversion#BmpConversion
added to CC list: Noel Gradin, who submitted https://gerrit.libreoffice.org/c/core/+/92841/2/include/vcl/bitmap.hxx https://gerrit.libreoffice.org/c/core/+/99914 -- >note: if step6, set Color Depth to "4bit Color" -> export gray scale image. i think 4bit color/grayscale is reverse. I think I have to rethink. Now I wonder why the color depth is not always treated as 0, even with the difference in plurality
ok, now I got it. https://opengrok.libreoffice.org/xref/core/vcl/source/filter/graphicfilter.cxx?r=0c600458#1849 https://opengrok.libreoffice.org/xref/core/vcl/source/filter/graphicfilter.cxx?r=0c600458#552 Is there any possibility that an image will go through both these two routine(one with "Colors", and one with "Color"?, and will that produce unexpected result?
Sorry, no idea
Tomoyuki Kubota committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c0e18f68b6a03e2b8b5c0cf4ee7e1009c35dc26c tdf#135303 It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
even after my patch, this bug still seems reproducible.
Dear sawakaze, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
See: https://ask.libreoffice.org/t/libreoffice-draw-export-as-image-only-black-and-white/94714