Description: When exporting to PNG (and possibly other raster formats), Draw proceeds to crop the image to its most compact shape, excluding all transparent space around it, and the produced image has the wrong width:height ratio (i.e. is distorted). Steps to Reproduce: Please consider the following sequence, numbered as per the attached screenshots. 1. I created this simple figure: a gray rectangle with a circle inside, placed at the recangle's right edge. No borders, only fill. 2. I took the outer rectangle and made it transparent. 3. I selected both shapes and proceeded to export to PNG. 4. Checked the "Selection" box in the save dialog, since I only want to export the selected shapes. 5. In the "PNG Options" dialog that pops up, I set the resolution to something fixed (e.g. 100 px/cm) and set one of the dimensions (in this case, width) to some fixed value (e.g. 1 cm); the other dimension gets adjusted automatically to keep it in proportion. Transparency is enabled too. NOTE: the problem happens even if I don't touch these fields and leave them at their default values. 6. The resulting image is distorted out of ratio; the original circle now looks like an ellipse. Draw attempts to crop the image down to its most compact shape (excluding all transparent space around it), but still uses the width:height ratio of the originally selected shapes (from step 3). Actual Results: Generated PNG raster image is distorted/out of proportion in relation to original drawing. Expected Results: Aside from the fact that the wrong proportions are used (which is obviously a bug), I believe the export operation should not crop down to the most compact shape (excluding all transparent space around it), since it's very useful to be able to place a drawing inside a transparent rectangle/square and then export to a raster format with the correct overall pixel size. Reproducible: Always User Profile Reset: No Additional Info: I have tried this in LibreOffice Draw 6.4.5.2 portable (the latest official portable version available at the libreoffice.org website) on Windows 10, since unfortunately I can't install the full version in my IT-managed work computer. This used to work just fine in 5.2.7 (unfortunately the only old version to which I can compare right now). This bug is very annoying to me, since I need to export a large set of images with transparent space around them (so that they end up with correct pixel sizes) and I have no easy workaround to this issue. NOTE: this might be related to bug #134775, but I'm not sure. I appreciate very much if you would consider fixing this.
Created attachment 163820 [details] Step 1
Created attachment 163821 [details] Step 2
Created attachment 163822 [details] Step 3
Created attachment 163823 [details] Step 4
Created attachment 163824 [details] Step 5
Created attachment 163825 [details] Step 6
Created attachment 163826 [details] Version info
Do you save your file on a local disk or on a network? Indeed, renaming the file into an zip and try to unzip it, I get: End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
sorry wrong bugtracker, forget my last comment.
Please attach an example document. Set to NEEDINFO. Change back to UNCONFIRMED after you have provided the document.
Dear msh, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping
Dear msh, 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
Created attachment 191176 [details] Transparent rectangle and circle in color to test No issue seen with: Version: 7.5.8.2 (x86) / LibreOffice Community Build ID: f718d63693263970429a68f568db6046aaa9df01 CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win Locale: es-MX (es_MX); UI: en-US Calc: threaded
Created attachment 191177 [details] Outcome of export selection to png
Created attachment 191197 [details] Impress slide with large margins and two drawing objects to export to PNG Export to PNG with transparency set exports only the parts of the slide inside the margins but the dimensions of the slide are set as the dimensions of the PNG resulting in distortion of the resulting PNG. Also applies to Draw. Attachment created as described: 1. Open a new Impress blank slide at Screen 16:9 2. Set the right and left margins to 10 cm, leaving an 8cm area for content 3. Draw a 5.00 cm diameter circle, blue fill, inside the margins 4. Copy the circle to overlap a margin and area fill circle to green 5. Click File > Export and set PNG, ensure Transparency is ticked, leave other settings RESULT: Exported PNG has proportions of full page but only the content within the margins are included. The blue circle is distorted to a flat ellipse and green circle is cropped, see slide 2 6. Instead, click File > Export and set PNG, ensure Transparency is NOT ticked, leave other settings RESULT: Exported PNG has proportions of full page and all content is complete and undistorted, see slide 3
Reproduced as in comment 15. Thanks for the updated steps and hints, Alistair. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6f4adc1274cfac30b9097411bb193bd4386969f0 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Issue is tracked in bug 122155, let's mark as duplicate. *** This bug has been marked as a duplicate of bug 122155 ***