Description: draw で PNG 画像を挿入した図形をPNG形式でエクスポートすると、挿入した画像が乱れて正常に表示されないことがある。 Actual Results: 画像が壊れてエクスポートされる。 Expected Results: 画像が壊れずにエクスポートされる。 Reproducible: Sometimes User Profile Reset: No OpenGL enabled: Yes Additional Info: [Information automatically included from LibreOffice] Locale: ja Module: TextDocument [Information guessed from browser] OS: Windows (All) OS is 64bit: yes
Could you give a try to last stable LO version 6.4.5? Also, do you have this behaviour for any image or just specific images?
from Google translate gloss... <clip> Description: When you export a PNG image with a PNG image inserted in draw in PNG format, the inserted image may be distorted and may not be displayed normally. Actual Results: The image is corrupted and exported. Expected Results: The image is exported without corruption. </clip>
Created attachment 166653 [details] Position and size dialog, Export dialog I have probably the same experience. My LO is: Version: 6.4.6.2 Build ID: 1:6.4.6-0ubuntu0.20.04.1 CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3; Locale: cs-CZ (en_DK.UTF-8); UI-Language: en-US Calc: threaded Example: 1) A source PNG image has resolution 742x300px. 2) PNG is inserted into Draw by drag-and-drop. 3) Right click to PNG image > original size. 4) In the Position and Size dialog I can see size 742.1 pt x 300.0 pt. 5) CTRL-A (select all). Selected area is the same as the picture (there is nothig outside the original picture). 6) File > Export... 7) In the Export dialog check Selection, output format: PNG. 8) PNG Options dialog appears - strangely enough the size is: 742.41 x 299.96 points, resolution 37 pixels/cm. Click OK. 9) Exported image has resolution 990x400px (what can I see is the same what was previously selected - different resolution is not caused by exporting more than it is supposed). And the picture is blurred of course. BTW: When I am in the step 8) and change the width of the picture to 742 points (instead of 742.41), and click to the height field, LO Draw crashes immediately. So I can see only one way how to export PNG image without any distortion: 1) Zoom the picture to 100% size. 2) Make a screenshot. And for small pictures it is actually simpler way than use export dialog (as export dialog does not remember my settings so I have to check "Selection" and change export format from JPG to PNG during every export).
Created attachment 166659 [details] PNG Options dialogue - export size in px vs original pixture size in px Additional info: I realized that I can set units to pixels in the PNG Options dialogue: 1) Before I set size to pixels, there is default size 990 x 400 pixels. 2) When I change Width to 724 pixels, LO changes Height to 293 pixels (instead of 724x300 px, which is original picture resolution, see attachment). 3) Exported picture has size 724x293px. Expected results: * when exported picture is in its original size (in the drawing), the PNG Options dialogue should use the same size in pixels by default, * aspect ratio should be preserved. Tested on Xubuntu 20.04, LO Version: 7.0.2.2 Build ID: 0b4360524e0359c479b908cb9f8f3765ab0cc7ad CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
We need an example png to test
Created attachment 173920 [details] PNG image for testing, 742x300px There is a picture 742x300 px in the attachment. In my previous comment (nr. 4) I made a mistake and used 724px instead of 742. I am sorry for that. Now, when I use correct width 742px in the "PNG Options" dialogue LO calculates 300px height (which is correct and aspect ratio is preserved). So expected result is just one: * when exported picture is in its original size (in the drawing), the PNG Options dialogue should use the same size in pixels by default.
(In reply to Robo Pluhar from comment #6) > Created attachment 173920 [details] > PNG image for testing, 742x300px > > There is a picture 742x300 px in the attachment. In my previous comment (nr. > 4) I made a mistake and used 724px instead of 742. I am sorry for that. > Now, when I use correct width 742px in the "PNG Options" dialogue LO > calculates 300px height (which is correct and aspect ratio is preserved). > > So expected result is just one: > * when exported picture is in its original size (in the drawing), the PNG > Options dialogue should use the same size in pixels by default. This image has a weird DPI. If I open it with GIMP and view Image - Properties, it shows DPI as 2,834×2,834 px/mm. GIMP does export it correctly, however, and even preserves the DPI. With LibreOffice, to export an image in its original size, you need to right-click the image and select Original size first. If we do it in this case, the exported resolution is 990x400 and the DPI will change to 72x72 ppi. So LibreOffice should learn to behave as smartly as GIMP. NixOS Version: 7.3.0.0.alpha0+ / LibreOffice Community Build ID: 67e47070a7580a17804adce812cc2f98bfe7b51f CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: x11 Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded
Created attachment 173933 [details] Inage properties (PhotoFiltre, IrfanView) (In reply to Buovjaga from comment #7) > This image has a weird DPI. If I open it with GIMP and view Image - > Properties, it shows DPI as 2,834×2,834 px/mm. GIMP does export it > correctly, however, and even preserves the DPI. > > With LibreOffice, to export an image in its original size, you need to > right-click the image and select Original size first. If we do it in this > case, the exported resolution is 990x400 and the DPI will change to 72x72 > ppi. I opened the image in PhotoFiltre and IrfanView and both of them claim that the DPI is 72x72, and ImageMagick says: $ identify -verbose -units PixelsPerInch ExStudPr_17_predmet_planu_plain.png Image: ExStudPr_17_predmet_planu_plain.png Format: PNG (Portable Network Graphics) Mime type: image/png Class: DirectClass Geometry: 742x300+0+0 Resolution: 71.98x71.98 Print size: 10.3084x4.16782 Units: PixelsPerInch .... Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
(In reply to Robo Pluhar from comment #8) > Created attachment 173933 [details] > Inage properties (PhotoFiltre, IrfanView) > > (In reply to Buovjaga from comment #7) > > This image has a weird DPI. If I open it with GIMP and view Image - > > Properties, it shows DPI as 2,834×2,834 px/mm. GIMP does export it > > correctly, however, and even preserves the DPI. > > > > With LibreOffice, to export an image in its original size, you need to > > right-click the image and select Original size first. If we do it in this > > case, the exported resolution is 990x400 and the DPI will change to 72x72 > > ppi. > > I opened the image in PhotoFiltre and IrfanView and both of them claim that > the DPI is 72x72, and ImageMagick says: > > $ identify -verbose -units PixelsPerInch ExStudPr_17_predmet_planu_plain.png > Image: ExStudPr_17_predmet_planu_plain.png > Format: PNG (Portable Network Graphics) > Mime type: image/png > Class: DirectClass > Geometry: 742x300+0+0 > Resolution: 71.98x71.98 > Print size: 10.3084x4.16782 > Units: PixelsPerInch > .... > Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org Hmm, you are right. 2,834×2,834 px/mm is the same approximation as 72x72 ppi.
Already behaves like this in oldest of Linux 43all bibisect repo
Dear taro, 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
I think there is some confusion in this report due to the poor UX of the dialog, and how resolution and size interact in it, see bug 144195. taro's original might have been that the aspect ratio is lost ("distorted" as translated in comment 2) and I'm wondering if it's related to bug 122155. Otherwise, a relevant report is bug 132959 and related: metadata is not written to file as it should. taro, Robo, Buovjaga, what do you think?
(In reply to Stéphane Guillou (stragu) from comment #12) I made new tests on: Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: cs-CZ (en_DK.UTF-8); UI: en-US Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.4 Calc: threaded and: * pixel size of the exported image seems to be OK, * 72DPI seems to be OK, * exported picture is stil blurred. I do not see any connection to other bugs you mentioned: * Bug 144195: I am able to set pixel size correctly and DPI seems to be correct (in PhotoFiltre). * Bug 122155: I do not experience any problems with margins (well, I export selected objects only). * Bug 132959: I do not see any metadata problem. But I agree that UX of the export is poor - for me it is difficult to set up all export setting correctly. For more pictures would be very tidious too. But this is just an academic question while exported picture is blurred (so useless). Still the only way how to export PNG is to make screenshot of Draw. I am going to add attachments from my test.
Created attachment 194872 [details] Draw: Resolution settings for PNG export
Created attachment 194873 [details] Resolution test comparison - output (left), original (right). Pixel size and DPI seems to be the same, but exported picture is blurred. Oh no, how blind was I! I have just noticed, that the output picture is different - there is line of white pixels on the bottom and on the right of the picture. That is the reason why the picture is blurred.
Created attachment 194874 [details] Resolution test comparison 2 - output (left), original (right). Finally not blurred image: I changed pixel size of the exported picture - add one pixel for width and height and the size of the image is exported as was set in the dialog and the image is not blurred (because of the extra white lines top and bottom). So when I crop the output picture (cut out the white on the bottom and right side), I finally get what I wanted.
Created attachment 194875 [details] Libre office Draw test file
@Mike, Quikee given comment 15 and comment 16 any chance the PNG export at original size has Rectangle::GetWidth() Rectangle::GetHeight() with missing +1 handling? Similar to bug 98896 for single monitor slide show, resolved with https://gerrit.libreoffice.org/c/core/+/67941