Bug 93462 - Lossless compression in ‘Export as PDF’ doesn’t work—PNG images get distorted
Summary: Lossless compression in ‘Export as PDF’ doesn’t work—PNG images get distorted
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.3.0.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Import-Draw PDF-Export
  Show dependency treegraph
 
Reported: 2015-08-16 10:47 UTC by agere
Modified: 2022-05-17 14:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
An image filled with #CCDED8 (329 bytes, image/png)
2019-07-15 23:29 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description agere 2015-08-16 10:47:53 UTC
Paste a PNG image into drawing via ‘Insert’ → ‘Image’. I’ve used this one: https://mega.nz/#!4o8mCaAJ!uEioSdvzNAv2cZULRF0IZhnnlRKqQyvVotlB2IzvMkw
Then try to ‘File‘ → ‘Export as PDF…’ and then choose ‘Lossless compression’ under ‘Images’ in the ‘General’ tab. Uncheck ‘Reduce image resolution’ if it’s set. Open the resulting PDF in the viewer of your choice. Then save the image to a file. Open the file in GIMP. Go to ‘Image’ → ‘Image properties’, the file type should be detected as PNG. Check the file size and notice how it changed. Use a colour picker tool to compare backgrounds—in the image I’ve used the background colour was #CCDED8 and after export to PDF it became #CFE0DA. This isn’t what ‘lossless compression’ should do.
Comment 1 tommy27 2015-08-17 16:52:49 UTC
did it work in older versions?
Comment 2 Buovjaga 2015-09-08 10:24:48 UTC
Better & faster way to confirm is to open the PDF in Inkscape and use the eyedropper tool. Hovering over the green bg it says in the status bar #CFE0DA.

Confirmed the original color is #CCDED8.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: b3de73f32af6276a60f5678861c461631a75e743
TinderBox: Win-x86@39, Branch:master, Time: 2015-09-01_06:18:16
Locale: en-US (fi_FI)

4.3.0.1
Comment 3 QA Administrators 2017-10-30 08:29:55 UTC Comment hidden (obsolete)
Comment 4 Mike Kaganski 2019-07-15 23:29:33 UTC
Created attachment 152797 [details]
An image filled with #CCDED8

Still reproducible with e.g. attached image (the original image is no longer available from the link) using Version: 6.3.0.1 (x64)
Build ID: 41ac97386aba908b6db860cfb4cfe2da871886ae
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 5 QA Administrators 2021-12-04 04:44:07 UTC Comment hidden (obsolete)
Comment 6 Julien Nabet 2022-05-17 07:50:05 UTC
On pc Debian x86-64 with LO Debian package 7.3.3.2, I don't reproduce this.
I used Lossless compression and unchecked "Reduce image resolution".

(BTW, never found eyedropper tool in Inkscape , I used Gimp)

Could someone confirm?
Comment 7 Buovjaga 2022-05-17 14:11:53 UTC
(In reply to Julien Nabet from comment #6)
> On pc Debian x86-64 with LO Debian package 7.3.3.2, I don't reproduce this.
> I used Lossless compression and unchecked "Reduce image resolution".
> 
> (BTW, never found eyedropper tool in Inkscape , I used Gimp)
> 
> Could someone confirm?

I confirm in Inkscape the colour remains the same. If you can't find the dropper, the shortcut key is D

Arch Linux 64-bit
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: eac2e7520de09d019c07b63f9f89d865c20b1e4e
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 13 May 2022
Comment 8 Julien Nabet 2022-05-17 14:38:01 UTC
(In reply to Buovjaga from comment #7)
> (In reply to Julien Nabet from comment #6)
> > On pc Debian x86-64 with LO Debian package 7.3.3.2, I don't reproduce this.
> > I used Lossless compression and unchecked "Reduce image resolution".
> > 
> > (BTW, never found eyedropper tool in Inkscape , I used Gimp)
> > 
> > Could someone confirm?
> 
> I confirm in Inkscape the colour remains the same. If you can't find the
> dropper, the shortcut key is D
Indeed! Thank you for the tip! :-)