Download it now!
Bug 33455 - 1bit PNGs rendered in black and white
Summary: 1bit PNGs rendered in black and white
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All Windows (All)
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.4.0 target:4.3.0.2 target:4.2.6
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 02:02 UTC by bugzilla33
Modified: 2014-06-29 12:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (6.96 KB, image/x-png)
2011-01-25 02:02 UTC, bugzilla33
Details
document (135.98 KB, image/x-png)
2011-01-25 02:03 UTC, bugzilla33
Details
proposed fix (1.37 KB, patch)
2011-03-25 07:52 UTC, Caolán McNamara
Details
having a stab at the windows one too (3.19 KB, patch)
2011-03-25 08:14 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla33 2011-01-25 02:02:57 UTC
Created attachment 42442 [details]
testcase

1-bit per pixel PNGs are not decoded correctly.
See attachments.
Comment 1 bugzilla33 2011-01-25 02:03:18 UTC
Created attachment 42444 [details]
document
Comment 2 Noel Power 2011-01-25 03:16:12 UTC
confirmed :-/ strange when you insert a picture ( same 1 bit per pixel example ) works fine. Additionally the embedded image ( for the backgraphic ) is correct so really this is some strange setting in the writer code I think. I will try to have a look at thing
Comment 3 Joe Smith 2011-02-10 16:11:55 UTC
Testing OOo 3.3 and LibO 3.3 on Fedora 13.

The test image gives results exactly reversed from that shown in the document.png image: the Format > Page > Background preview panel shows the image having black pixels, but the document background shows red pixels. An exported pdf shows red as well.
Comment 4 Caolán McNamara 2011-03-24 09:09:37 UTC
This is some cockup where 0% transparency is != no transparency or something of that nature.
Comment 5 Caolán McNamara 2011-03-25 07:52:09 UTC
nah, tweaking transparency just promotes it to a different bits per pixel of course. 

vcl drawing appears to simply assume white/black for one bit depths
Comment 6 Caolán McNamara 2011-03-25 07:52:45 UTC
Created attachment 44850 [details]
proposed fix
Comment 7 Caolán McNamara 2011-03-25 07:53:30 UTC
cmc->thb: How about the attached, does that look sane to you ?
Comment 8 Caolán McNamara 2011-03-25 07:55:49 UTC
ah crap, bug says windows, so while this would fix it for me on linux more work required there I guess.
Comment 9 Caolán McNamara 2011-03-25 08:14:42 UTC
Created attachment 44851 [details]
having a stab at the windows one too
Comment 10 Thorsten Behrens (CIB) 2011-03-25 08:27:01 UTC
Yeah, that clearly looks right - and aligns x11/win32 behaviour with svp and aqua plug.
Comment 11 Caolán McNamara 2011-03-28 08:58:58 UTC
confirmed builds under windows
Comment 12 Commit Notification 2014-06-26 15:30:42 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be9d65bb5f5a83c19eec02a037b8f808de70ecb8

Related: fdo#33455 retain color on scaling of 1 bit depth pngs



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2014-06-26 15:45:21 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=db298f22a04e409a555d7c3ccec4c1dae91a6e1b&h=libreoffice-4-3

Related: fdo#33455 retain color on scaling of 1 bit depth pngs


It will be available in LibreOffice 4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2014-06-29 12:41:05 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a519b6203eb4ea9be61d8e5c3da7fd51e4d71419&h=libreoffice-4-2

Related: fdo#33455 retain color on scaling of 1 bit depth pngs


It will be available in LibreOffice 4.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.