Bug 145953 - Image ratio broken on resize when size is defined relative to entire page
Summary: Image ratio broken on resize when size is defined relative to entire page
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2021-11-29 20:09 UTC by Telesto
Modified: 2023-05-05 16:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (15.13 KB, application/vnd.oasis.opendocument.text)
2021-11-29 20:09 UTC, Telesto
Details
image resizing (74.52 KB, application/vnd.oasis.opendocument.text)
2023-05-05 16:53 UTC, goodguy00@zoho.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-11-29 20:09:30 UTC
Description:
Image ratio broken on resize when size is defined relative to entire page

Steps to Reproduce:
1. Open the attached file
2. Pick a corner and increase the size 
3. Downsize size image again

Actual Results:
'Square' becomes rectanglish

Expected Results:
Same proportions


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ddc57169ac8d1de00403dbb09fef5221beaa0f3d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-11-29 20:09:48 UTC
Created attachment 176576 [details]
Example file
Comment 2 Telesto 2021-11-29 20:14:25 UTC
Also in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

note: keep ratio is unchecked by default in 4.4.7.2 on file open
Comment 3 Rainer Bielefeld Retired 2021-11-30 06:13:49 UTC
REPRODUCIBLE with Installation of Version:7.2.1.2 (x64); Build ID: 87b77fad49947c1441b67c559c339af8f3517e22; CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI: de-DE; Calc: threaded  |  my default User Profile

I did some resize operations, all with bottom right corner grip (all length in mm):
width	height	ratio
100,81	92,08	1,09  (original size)
156,39	133,65	1,17
19,49	14,85	1,31
187,1	145,54	1,29
8,41	5,94	1,42

You see any operation changed ratio between shown dimensions in Element properties. Which seem to be correct at least for original size in document. 

But:
If you 
10. switch anchor to page in drawing properties, 
   ยป the image jumps to the top of the page, and it's obvious that size
     increases, 
     but in properties, when I uncheck "relative to", 
     I still see width = 100,29 mm and height = 92,52 mm.                ๐Ÿ˜ฅ
     What is more or less the original size. 
11. And when I confirm with [ok] 
     the image will shrink to that size. 
But Dimensions after step 10 are wrong, real size was 123,9 / 106,9 mm

What might be a completely different bug.
Comment 4 Rainer Bielefeld Retired 2021-11-30 06:17:21 UTC
Problems from (10) and (11) still REPRODUCIBLE with Server Installation of Version: 7.4.0.0.alpha0+ (x64)  Build ID ae36ee4f3aa544e53e2edad93d6d79160b27bc9d
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win | Special devUserProfile | Locale: de-DE (de_DE); UI: de-DE | Calc: CL
Comment 5 goodguy00@zoho.com 2023-05-05 16:51:15 UTC
still there and even worse ...
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-CH (en_US.UTF-8); UI: en-US


choose a small image (compared to the page-size), page-anchored, check keep ratio, put height to relative to page area and 100%, set horiz pos to right / entire page. ok it. => image is not extended to page height. open the dialog and click on the height percentage. it jumps to 106%. ok it, and the image gets distorted, because despite "keep aspect" it does not adjust width. you can repeat that 'open the dialog and click on the height percentage' which keeps on jumping to higher values until it hits the lower page boundary. then the image starts to shring the width and gets away from the right page border (despite being still at horiz right to page) and cannot be dragged back to the right.
(see attachment)
Comment 6 goodguy00@zoho.com 2023-05-05 16:53:22 UTC
Created attachment 187102 [details]
image resizing