Bug 135303 - Bitmap Export: Export color bitmap(.bmp) in spite of setting 4bit grayscale
Summary: Bitmap Export: Export color bitmap(.bmp) in spite of setting 4bit grayscale
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.0.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Format-Filters
  Show dependency treegraph
 
Reported: 2020-07-30 09:58 UTC by sawakaze
Modified: 2025-08-18 03:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ScreenCast (1.90 MB, video/x-matroska)
2020-07-30 09:58 UTC, sawakaze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sawakaze 2020-07-30 09:58:02 UTC
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
Comment 1 sawakaze 2020-07-30 09:58:25 UTC
Created attachment 163757 [details]
ScreenCast
Comment 4 himajin100000 2020-08-02 05:45:10 UTC
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
Comment 5 himajin100000 2020-08-02 09:03:14 UTC
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?
Comment 6 Noel Grandin 2020-08-13 12:51:52 UTC
Sorry, no idea
Comment 7 Commit Notification 2020-09-23 07:07:39 UTC
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.
Comment 8 himajin100000 2020-09-27 01:10:37 UTC
even after my patch, this bug still seems reproducible.
Comment 9 QA Administrators 2022-09-28 03:32:46 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2025-08-18 03:11:40 UTC
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