| Summary: | Changing the DPI during Export of PNG and JPEG does not change the resulting file | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Rafael Lima <rafael.palma.lima> |
| Component: | Draw | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | aron.budea, heiko.tietze, quikee, stephane.guillou, telesto |
| Priority: | medium | ||
| Version: | 6.4.7.2 release | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | test results on LO 7.2 and 7.3 | ||
|
Description
Rafael Lima
2022-08-09 13:24:52 UTC
The export images are identical when the "Modify Resolution" is selected. However, the "Modify Dimensions" option works as expected, resulting in different files with the specified dimensions. Also reproduced in: Version: 7.4.0.2 / LibreOffice Community Build ID: 1512ce97d7ed39dce3121f7e15651fd8895f950e CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded I also tested with the JPEG format to export a shape as image and the results were the same. Changing the DPI does not change the resulting image. It seems like the "Modify resolution" part of the dialog is simply being ignored. "Modify dimension" works fine. I found another weird inconsistency in the dialog. Try the following steps: STEPS TO REPRODUCE PART A (Create a default image) 1) Follow the same steps as in Part A from comment #0 using the PNG filter (the exact same thing will happen with JPEG). PART B 1) Follow the same steps from Part A, but now change the export settings 2) In "Modify Dimension" change the Height to a value that is larger than the current value. The width will automatically adjust to keep the aspect ratio. 3) Export the file; notice that now the file is indeed larger (as expected) Part C (Here's the weird bit) 1) Follow the same steps from Part A, but now change the export settings 2) First click "Modify Resolution" and change the DPI to 200; after that click "Modify Dimension" and change the height to the same value used in Part B. 3) Export the image; Now a third different file was created, which is twice the size of the image in Part B. This is not expected because now the DPI information in the dialog affected the resulting image. However, the resulting image does not have 200 DPI. Instead, the higher DPI increased the image size, but the pixel density remained the same. Based on these experiments, I'm start to think there might be something wrong with the dialog itself, with how it processes the user inputs. Created attachment 181869 [details] test results on LO 7.2 and 7.3 Could also confirm for PNG with: Version: 7.2.7.2 / LibreOffice Community Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded But also for: Version: 6.4.7.2 Build ID: 1:6.4.7-0ubuntu0.20.04.4 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; Locale: en-AU (en_AU.UTF-8); UI-Language: en-US Calc: threaded However, I could not confirm with JPG, unfortunately. The JPG exports' shasums are different, and the DPIs are correct in the image properties. See the attached table of results for my tests for 7.2 and 7.3. Wondering if the JPG issue should be reported seperately? About the PNG export, notice that even with the default settings, the DPI chosen is not respected: for both 96 and 300 DPI, you end up with a 72 DPI file. Tips for testing: - GIMP is useful to check resolution and size (with Image > Image Properties). - The bash command shasum can be used to check if the files are the same (shasum filename.png) The source cause is bug 144195, so marking as duplicate. *** This bug has been marked as a duplicate of bug 144195 *** |