Hi, Bug discovered under windows 10 pro and LibreOffice 5.2.4.2 (French version). Still there on 5.2.5.1 (XP pro). On 5.1.4 (Ubuntu 16.04) everything is OK. Under Writer, Draw or Calc, when I export to pdf and chose "JPEG Compression", the other parameter "Reduce image resolution" doesn't work. I.e if there are "big" images in the document, the generated pdf has big images in it and is sometime hard to read with several pdf reader (no image or artefacts or ...). When I chose "Lossless compression" everything works as expected. Strangely, Impress seems not to be affected by this bug : "Jpeg" or "Lossless" equally works. Sincerly, Sylvain.
Not sure to understand correctly what you mean. There is several bug report about image compression in pdf export. For example bug 99723 and bug 100890. Please could you describe more precisely your finding with numbers and a clear step by step procedure to reproduce the problem. Please attach a sample document with which you see the problem, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) Best regards. JBF
Created attachment 131148 [details] Jpg for testing pdf export
Sorry, I now realise that the bug is not as easy as I thought to reproduce. So : 1/ Take a jpg image (for example the one I attached, 4000 x 439 px ~ 64ko). 2/ Open a new odt document (A4 vertical for example). 3/ Insert this image in your odt and then resize it "a lot", for example to 2cm in width. 4/ **SAVE** the odt (otherwise it won't bug.) 5/ Now you should have a ~73 ko .odt 6/ Export as pdf and chose "Lossless compression" and "reduce image resolution 300dpi" you should obtain a ~9ko pdf (which seems normal). 7/ Do the same but with "JPEG Compression 90%" and still "reduce image resolution 300dpi" you should now obtain a 66 Ko pdf (which isn't normal ...) If you open the 66Ko pdf and copy the included image to GIMP you will see that it is still the "full" 4000x439px image so it hasn't been reduce in size. It seems that in certain cases the "reduce image resolution 300dpi" option isn't taken into account. Sincerely, Sylvain.
Repro. The file size with version 3.5 is 7k with JPEG + reduce. Is the problem on Ubuntu 5.2 as well? Then we could change OS to All. Win 7 Pro 64-bit Version: 5.4.0.0.alpha0+ Build ID: 1d810b69a584fc33f4178c7012f68f551ba2e03b CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-02-12_23:34:02 Locale: fi-FI (fi_FI); Calc: CL LibreOffice 3.5.0rc3 Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
The winner is the same commit as in bug 99723. Adding Cc: to Michael Meeks. https://cgit.freedesktop.org/libreoffice/core/commit/?id=76ec54e8c9f3580450bca85236a4f5af0c328588 author Michael Meeks <michael.meeks@collabora.com> 2016-02-08 14:24:15 (GMT) committer Michael Meeks <michael.meeks@collabora.com> 2016-02-09 00:09:08 (GMT) "tdf#97662 - Try to preserve original compressed JPEGs harder."
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this. I added some traces in HasAdequateCompression method (see https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/pdfextoutdevdata.cxx#800) Whatever we resize the logo or not in LO, I always see the same values: aSize.Width()=2000 aSize.Height()=439 rGraphic.GetLink().GetDataSize()=65280 I think we should test if there's been some resizing or not. The pb is I don't know how to retrieve the resized values.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9fd6b6b1f5b83d923a47252b744358721761d9cf tdf#105954 PDF export, ReduceImageResolution: fix re-compressing large images It will be available in 6.1.0. 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=efd59fd1d7fc9d955a2b924f247709201f2281c5&h=libreoffice-6-0 tdf#105954 PDF export, ReduceImageResolution: fix re-compressing large images It will be available in 6.0.5. 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.
Verified fixed in master: Version: 6.1.0.0.alpha1+ Build ID: 99343e6305eeeceb40a8e7ff551cb6cb1d2901af Threads CPU : 4; OS : Linux 4.4; UI Render : par défaut; VCL: gtk3; Ubuntu_16.04_x86-64 Locale : fr-FR (fr_FR.UTF-8); Calc: threaded Thank you very much. Best regards. JBF
*** Bug 104479 has been marked as a duplicate of this bug. ***
*** Bug 116904 has been marked as a duplicate of this bug. ***