Bug 54768 - Asking to restore image to original size gets wrong size when the image is clipped
Summary: Asking to restore image to original size gets wrong size when the image is cl...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard: target:24.2.0 target:7.6.0.0.beta2
Keywords:
Depends on:
Blocks: Calc-Images
  Show dependency treegraph
 
Reported: 2012-09-11 10:55 UTC by Callegar
Modified: 2023-06-29 11:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Testcase (24.43 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-07-08 08:47 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2012-09-11 10:55:57 UTC
Tested in libreoffice calc.

The image is restored to the original size ignoring the clipping.

E.g. Image that is 10cm high, but is clipped 1cm on top. Asking the image to be restored to original size makes it 10cm tall rather than 9 as it should because of clipping. Hence the image gets distorted.
Comment 1 bfoman (inactive) 2013-03-22 09:38:02 UTC
Could you attach any example documents to allow others to check on different
system/build?
Comment 2 Mike Kaganski 2013-07-08 08:47:35 UTC
Created attachment 82170 [details]
Testcase

REPRODUCIBLE with LO 4.0.4.2 and 4.1.0.2.0 under Win7x64.

Steps to reproduce:
1. Create a new empty worksheet.
2. Insert a picture (e.g. Insert->Picture->From File...)
3. Click on the inserted image, Picture toolbar appears
4. Use "Crop" tool to crop 2 cm from top -> OK
5. Right-click on the cropped image and select "Original Size".

Expected behaviour: the image stays proportional.

Actual result: the image stays cropped, but stretches to the size of original image, thus becomes distorted.
Comment 3 QA Administrators 2015-04-01 14:42:56 UTC Comment hidden (obsolete)
Comment 4 Callegar 2015-04-02 08:20:29 UTC
Bug is still present as of 4.4.2.1 on Linux (but I think that OS is not relevant here)
Comment 5 Callegar 2016-02-16 14:38:31 UTC
Bug still present in 5.1.1 RC 1
Comment 6 Kenneth Hanson 2017-09-28 06:55:17 UTC
Bug still present in 5.4.1.

It seems to affect not only "Original Size", but also similar operations. For example, cropped images in placeholders are distorted when switching a slide layout in Impress. (Can't recall any others at the moment.)
Comment 7 QA Administrators 2018-09-29 02:42:08 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2020-09-29 04:06:48 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2022-09-30 03:53:41 UTC Comment hidden (obsolete)
Comment 10 Mike Kaganski 2022-11-30 08:53:47 UTC
Repro using Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL
Comment 11 Commit Notification 2023-06-27 12:19:07 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f5bf91ea73bf8a7cd3abc0f343ab2bdceaad905a

tdf#54768 sc: fix resizing of cropped images to original size

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2023-06-28 11:12:03 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/d41456c2aa86ecbc70b45e11eb6e411e33b3ac06

tdf#54768 sc: fix resizing of cropped images to original size

It will be available in 7.6.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 NISZ LibreOffice Team 2023-06-29 11:09:10 UTC
Verified in:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f1b0aca6bf520626d3c9a1fac67cd2de2c10c78c
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded