Bug 119492 - Image got messed up when exporting directly to PDF
Summary: Image got messed up when exporting directly to PDF
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2018-08-25 09:02 UTC by libre
Modified: 2022-04-01 03:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
logo/image that is destroyed during export to pdf (4.42 KB, image/png)
2018-08-25 09:02 UTC, libre
Details
Result of PDF-Export (6.33 KB, application/pdf)
2018-08-25 12:29 UTC, Dieter
Details
export of logo anchored as Char (34.54 KB, application/pdf)
2018-08-25 12:44 UTC, V Stuart Foote
Details
source odt (12.90 KB, application/vnd.oasis.opendocument.text)
2018-08-25 14:38 UTC, libre
Details
resulting pdf (3.90 KB, application/pdf)
2018-08-25 14:38 UTC, libre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description libre 2018-08-25 09:02:06 UTC
Created attachment 144419 [details]
logo/image that is destroyed during export to pdf

I have an image which i would like to put into a writer. This works as expected, the image is shown as it should. When i export this now as PDF, the image gets messed up horrible. 

It makes no difference if the image is a .png or a .jpg. Only with .svg it works.
Comment 1 libre 2018-08-25 09:13:58 UTC
affects both latest stable releases, 6.0 and 6.1
Comment 2 libre 2018-08-25 09:17:02 UTC
i had to use openoffice now because i urgently need that document.
it works in openoffice 4.1.5
Comment 3 Dieter 2018-08-25 12:29:30 UTC
Created attachment 144425 [details]
Result of PDF-Export

For me everything looks normal (if you consider, that the image-file is very small)

I did the export with

Version: 6.0.6.2 (x64)
Build-ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 4 V Stuart Foote 2018-08-25 12:44:49 UTC
Created attachment 144427 [details]
export of logo anchored as Char

Can not confirm on Windows 10 Home 64-bit en-US with
Version: 6.1.0.3 (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: CL

Also, settings on the PDF export dialog will control the compression quality and and resolution--defaults may not be set to your liking

The logo (the PNG in attachment 144419 [details] ) is exported with its full resolution of 72dpi with "lossless" compression set.

Please post a screen clip, or the resulting PDF, showing the "destruction" noted.
Comment 5 libre 2018-08-25 14:38:17 UTC
Created attachment 144432 [details]
source odt
Comment 6 libre 2018-08-25 14:38:38 UTC
Created attachment 144433 [details]
resulting pdf
Comment 7 libre 2018-08-25 14:39:09 UTC
i added the source odt and the resulting pdf 
maybe something is wrong with my pdf reader or with the settings in my writer
Comment 8 libre 2018-08-25 14:58:59 UTC
it also looks that wierd in chromium, so i think its not a viewer problem.
i am running win7 x64 GER
Comment 9 Dieter 2018-08-25 15:57:06 UTC
I could export your odt-file without any problems. I also could had wrong image in your PDF. So I think, there is something wrong with you PDF-Export.
Comment 10 libre 2018-08-25 15:58:22 UTC
can you tell me what i have to delete to have a clean new install of libreoffice to get rid of that behaviour?
Comment 11 Dieter 2018-08-25 16:12:07 UTC
I'm no expert, but if a simple update doesn't help, you can
a) try it with a fresh user profile (see https://wiki.documentfoundation.org/UserProfile)
b) try with the master (separate installation) from https://dev-builds.libreoffice.org/daily/master/
Comment 12 libre 2018-08-25 17:10:02 UTC
i deleted libreoffice and the folder in appdata/roaming/libreoffice 
after installing again version LibreOffice_6.0.6_Win_x64.msi, it is still the same behaviour.
Comment 13 LibreTraining 2018-08-25 18:12:39 UTC
I extracted the source.odt file contents.
The image in the source.odt file is a very poor quality BMP which is only 77x97 pixels (100000000000004D00000061606A3C89746C458A.bmp).

In the ODT file the display dimensions on the image are set to approx. 0.8in x 1in.
Even at 300 DPI this image would have to be approx. 240x300 pixels.

So you have a very bad quality, very small image being enlarged.
I assume it also looks as bad in print as well as in Export to PDF.

Or am I missing something here?
Comment 14 libre 2018-08-25 18:17:25 UTC
i know that the picture is very bad, i can't change that as i do not have another one in .svg or high res jpg. But when i export this .odt with openoffice, its fine. When i export it in libreoffice, its messed up. So something is wrong here. 

It zooms in the shield of the bear - this can not be correct. no matter how bad the quality of the image is.
Comment 15 LibreTraining 2018-08-26 21:50:50 UTC
LibreOffice seems to have problems with images which have virtually no metadata inside. I am now remembering seeing this before.
So use an image editor to losslessly convert it to a PNG.
That should add proper metadata.
My guess is that then it will at least look the same as OO.

Please come back and let us know if that works.
Comment 16 libre 2018-08-26 21:54:18 UTC
I already tried that with windows 7 paint - opened it and exported it as .png/.jpg/.bmp - no change, same behaviour.
The only thing that seems to work is to online convert it to .svg but then i lose a lot of details
Comment 17 LibreTraining 2018-08-28 17:24:22 UTC
What is the original source of this image?
Perhaps there is a way to aquire it at better quality.
Comment 18 libre 2018-08-28 17:26:00 UTC
An old men who sent it to me in a .doc letter.
Comment 19 libre 2018-08-28 17:26:29 UTC
s/letter/email
Comment 20 Buovjaga 2018-09-23 14:02:32 UTC
I tried with your odt and cannot reproduce the "shield zoom" on Windows with 6.0, 6.1. Neither on Linux with 6.1, 6.2.
As you tried deleting your profile, I guess you were using the default PDF export settings after that. I can't figure out what could be different in your case.
Comment 21 libre 2018-09-23 14:48:21 UTC
I just removed everything from libreoffice (including appdata/roaming/libreoffice), installed LibreOffice_6.1.1_Win_x64.msi, downloaded the .png, went into libreoffice writer "insert" -> "picture" (the "" are guessed, i have the german version so it is "einfügen" -> "bild"), created a pdf and it behaves the same wierd way.
I have absolutely no idea what could cause that and i do not understand why no one is able to reproduce that. 
iirc i also was able to easily reproduce that on linux too, with fedora 28.

I always use default settings in libreoffice, absolutely standard, so it is no problem to delete the roaming folder.
Comment 22 Dieter 2018-09-23 15:26:24 UTC
Do you get the same result if you use a special PDF Creator (like PDFCreator or PDF24) or is it only if you use the PDF-Export from LibreOffice?
Comment 23 libre 2018-09-23 16:02:22 UTC
Just tested the pdfcreator - with that it works as expected when i convert the .odt to .pdf
Comment 24 Dieter 2018-09-24 07:26:18 UTC
I could reprodeuce it, when I choose "Export directly as PDF". If I choose "Export as PDF, everything is O. K. 

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 62cd86977ca41677c56fb2d1f97bb1c5cbdbd416
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-20_02:34:32
Locale: en-US (de_DE); Calc: CL
Comment 25 Buovjaga 2018-09-24 07:29:34 UTC
(In reply to Dieter Praas from comment #24)
> I could reprodeuce it, when I choose "Export directly as PDF". If I choose
> "Export as PDF, everything is O. K. 
> 
> Version: 6.2.0.0.alpha0+ (x64)
> Build ID: 62cd86977ca41677c56fb2d1f97bb1c5cbdbd416
> CPU threads: 4; OS: Windows 10.0; UI render: GL; 
> TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-20_02:34:32
> Locale: en-US (de_DE); Calc: CL

I cannot repro even with directly, Win or Linux. Maybe some underlying settings thing after all?
Comment 26 Dieter 2018-09-24 08:45:39 UTC
I did some further test, because I suddenly could reproduce it with "export as PDF" also. My observation: If you reduce JPEG compression to 90%, I get the messed image; if it is 100%, everything is O. K.

Tested with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 62cd86977ca41677c56fb2d1f97bb1c5cbdbd416
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-20_02:34:32
Locale: en-US (de_DE); Calc: CL
Comment 27 Buovjaga 2018-09-24 08:52:47 UTC
(In reply to Dieter Praas from comment #26)
> I did some further test, because I suddenly could reproduce it with "export
> as PDF" also. My observation: If you reduce JPEG compression to 90%, I get
> the messed image; if it is 100%, everything is O. K.

90% is the default, though. I tried with different DPI reduction settings, but still could not repro.
Comment 28 QA Administrators 2019-09-25 03:00:25 UTC Comment hidden (obsolete)
Comment 29 Timur 2021-03-04 15:11:28 UTC
No reliable repro steps and no repro in general. 
Please put to New only with exact repro steps and PDF settings after profile reset.
Comment 30 QA Administrators 2021-09-01 04:18:23 UTC Comment hidden (obsolete)
Comment 31 Timur 2021-09-01 07:39:27 UTC
(In reply to LibreTraining from comment #15)
> LibreOffice seems to have problems with images which have virtually no
> metadata inside. I am now remembering seeing this before.
Bug 52598 and bug 96178.

Needinfo for exact steps, also needs to be searched for being a duplicate.
Comment 32 QA Administrators 2022-03-01 03:42:43 UTC Comment hidden (obsolete)
Comment 33 QA Administrators 2022-04-01 03:40:21 UTC
Dear libre,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp