Bug 116902 - The aspect ratio isn't honored when using an external image area bitmap fill with "scale" setting
Summary: The aspect ratio isn't honored when using an external image area bitmap fill ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Area-Fill-Tab-Image 153937
  Show dependency treegraph
 
Reported: 2018-04-09 16:38 UTC by Telesto
Modified: 2023-09-27 16:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (597.38 KB, image/jpeg)
2018-04-09 16:38 UTC, Telesto
Details
test ODG with various combinations of settings (128.42 KB, application/vnd.oasis.opendocument.graphics)
2023-03-03 09:52 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-04-09 16:38:28 UTC
Description:
The aspect ratio isn't honored when using an external image area bitmap fill 

Steps to Reproduce:
1. Open Writer
2. Format -> Page - Area tab -> Bitmap
3. Add import
4. Check the scale checkbox
5. Press OK

Actual Results:  
Image with odd dimensions


Expected Results:
Honoring the aspect ratio


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.0.0.alpha0+
Build ID: 818619b0f2f7813decb26d0b14362dec76a8ff37
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2018-04-08_13:29:47
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2018-04-09 16:38:44 UTC
Created attachment 141232 [details]
Example file
Comment 2 Buovjaga 2018-04-22 14:19:24 UTC
Repro.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: de07f40030bbd604bc42d58f0e954cca284a2646
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 21st 2018
Comment 3 QA Administrators 2019-10-23 02:47:24 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2023-01-19 23:00:00 UTC
It's as if the scale setting uses percentages of the width and height _of the page_ rather than of the original size of the picture, as documented[1]:

"Scale: Mark to turn the height and width settings relative to original size."

Default values are both 100%, so the image should have its original aspect ratio.

[1]: https://help.libreoffice.org/7.6/en-US/text/shared/01/05210500.html

Reproduced in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 579d144290c1617fdb38d09b30900a6bbe390b8d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2023-03-03 09:50:14 UTC
Currently, using the "scale" setting at 100% is equivalent to using "stretch". If you change the values to e.g. 50% / 50%, you can see that the image is stretched, *then* scaled. In my opinion, it should not stretch at all.

Same in OOo 3.3 (in which we had "absolute" and "relative" options instead of "scale").

Inherited implementation error?
Comment 6 Stéphane Guillou (stragu) 2023-03-03 09:52:33 UTC
Created attachment 185721 [details]
test ODG with various combinations of settings
Comment 7 Stéphane Guillou (stragu) 2023-09-27 16:39:34 UTC
Note that now in master, the description in the UI changed from "Scale" to "As percentage of the parent", which matches what it does currently (and the help page was changed accordingly). This was to fix bug 154019.

Now, this ticket can stay open (and the summary changed) if the plan is to replace the current setting or add a new one to allow scaling the original image using percentages.