Bug 152736 - Editing the resolution of jpg or png exports changes physical image size by default
Summary: Editing the resolution of jpg or png exports changes physical image size by d...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2022-12-30 16:36 UTC by Bodo Eing
Modified: 2023-03-14 10:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bibisecting steps (6.52 KB, text/plain)
2023-03-14 10:46 UTC, sockseight
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bodo Eing 2022-12-30 16:36:18 UTC
Description:
Problem: Nicely formatted text can be integrated in MuseScore files only as images (png, jpg etc.). For this purpose, I am exporting Writer pages to jpg files at printing resolution (300 dpi). The default setting is 96 dpi, and on editing this value to 300dpi, physical image dimensions shrink automatically according to the initial pixel dimensions. Physical image dimensions then have to be manually be restored (which is a problem, because I never remember them).


Steps to Reproduce:
1.Create any Writer document and save it
2.File -> Export -> Select JPEG as file format
3.Click Radio Button "Change resolution" and Edit resolution from the default 96dpi to 300 dpi


Actual Results:
Physical Image size shrinks from 21.01 cm x 29.71 cm to 6.71 cm x 9.49 cm.

Expected Results:
I'd expect this menu to have a "Keep physical image dimensions" checkbox, which controls if image lengths or number of pixels are kept on resolution editing.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 Robert Großkopf 2023-01-14 07:34:20 UTC
The dialog is irritating at this moment. If you set the resolution from 96 dpi up to 300 dpi it doesn't change the field for the dimension, but it creates an image, which will need the same memory as the image with 96 dpi.

Click in the radio button for Modify dimensions: Width and height will be changed immediately. Now change the width to the width of the page and the needed memory grows by a factor of ten.

The dialog with the radio buttons has been created for changing dpi without changing dimension, as it was before up to LO 7.1.*. New introduced radio buttons are a regression, because they show the old dimension and still will change the content to a new dimension.

Tested with LO 7.4.4.2 on OpenSUSE 15.3 64bit rpm Linux.
Also tested with older versions. New dialog appears first with LO 7.2. LO 7.1.5.2 won't show the radio buttons. Changing of dpi will directly show a changing of dimensions. So you see: Oh, I have to adjust dimensions.
Comment 2 sockseight 2023-03-14 10:41:56 UTC
bibisected in version:

	Version: 7.2.0.0.alpha1+ / LibreOffice Community
	Build ID: 556243467a0ac3f647de75bf3fb6c9f3b72466a4
	CPU threads: 3; OS: Linux 5.10; UI render: default; VCL: gtk3
	Locale: en-IN (en_IN); UI: en-US
	Calc: threaded
			
repo: https://bibisect.libreoffice.org/linux-64-7.2.git-bundle
		
Commit info:
	commit 1bd58b9e8f6f2d0acf02effb6d4e1aca97830ec3
	Author: Jenkins Build User <tdf@pollux.tdf>
	Date:   Wed Apr 14 19:32:17 2021 +0200
		
			source b524e0f2636d7983dd5aba32b2fd3e61e08aac56
		
			source b524e0f2636d7983dd5aba32b2fd3e61e08aac56
		
	instdir/program/libsvtlo.so                        | Bin 3796888 -> 3797056 bytes
	instdir/program/setuprc                            |   2 +-
	instdir/program/versionrc                          |   2 +-
	instdir/share/config/images_breeze.zip             | Bin 1894974 -> 1894974 bytes
	instdir/share/config/images_breeze_dark.zip        | Bin 1890641 -> 1890641 bytes
	instdir/share/config/images_breeze_dark_svg.zip    | Bin 1572659 -> 1572659 bytes
	instdir/share/config/images_breeze_svg.zip         | Bin 1570169 -> 1570169 bytes
	instdir/share/config/images_colibre.zip            | Bin 2786106 -> 2786106 bytes
	instdir/share/config/images_colibre_svg.zip        | Bin 2899605 -> 2899605 bytes
	instdir/share/config/images_elementary.zip         | Bin 4199128 -> 4199128 bytes
	instdir/share/config/images_elementary_svg.zip     | Bin 5517640 -> 5517640 bytes
	instdir/share/config/images_karasa_jaga.zip        | Bin 4886426 -> 4886426 bytes
	instdir/share/config/images_karasa_jaga_svg.zip    | Bin 19318679 -> 19318679 bytes
	instdir/share/config/images_sifr.zip               | Bin 2110124 -> 2110124 bytes
	instdir/share/config/images_sifr_dark.zip          | Bin 2112073 -> 2112073 bytes
	instdir/share/config/images_sifr_dark_svg.zip      | Bin 1761342 -> 1761342 bytes
	instdir/share/config/images_sifr_svg.zip           | Bin 1757462 -> 1757462 bytes
	instdir/share/config/images_sukapura.zip           | Bin 3045510 -> 3045510 bytes
	instdir/share/config/images_sukapura_svg.zip       | Bin 4354769 -> 4354769 bytes
	.../config/soffice.cfg/svt/ui/graphicexport.ui     | 523 +++++++++++----------
	20 files changed, 279 insertions(+), 248 deletions(-)
		
Adding CC: to Aditya, Pratap Singh 
		
author	Aditya Pratap Singh <adityapratapsingh51@gmail.com>	Wed Mar 31 21:02:27 2021 +0530
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	Wed Apr 14 19:22:29 2021 +0200

		
attached: bibisecting steps
Comment 3 sockseight 2023-03-14 10:46:04 UTC
Created attachment 185950 [details]
bibisecting steps


bibisecting notes:
	to locate in which 7.2 commit the 'Modify Resolution' checkbox was introduced
		
bibisecting observations:
	a) general - oldest - 'Modify Resolution' absent
	b) general - master - 'Modify Resolution' present
	c) presence of 'Modify Resolution' checkbox - marked as 'bad'
	d) absence of 'Modify Resolution' checkbox - marked as 'good'
	e) confirmation - checkout 1bd58b9e8f6f2d0acf02effb6d4e1aca97830ec3 - 'Modify Resolution' present
	f) confirmation - HEAD^ - 'Modify Resolution' absent