Bug 87667 - Original Size (.uno:OriginalSize) doesnt work correctly when an image is cropped
Summary: Original Size (.uno:OriginalSize) doesnt work correctly when an image is cropped
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-24 06:56 UTC by Yousuf Philips (jay) (retired)
Modified: 2016-10-25 18:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-12-24 06:56:32 UTC
Steps:
1) Open Impress
2) Add an image
3) Right-click > Crop image and shrink the size
4) Right-click > Original Size
5) The cropped image is changed to the size of the original image

The function should not just check if the current image size is equal to the original image size, if an image is cropped, it should check what the cropped size on the original image is and set the image according to that.

Version: 4.5.0.0.alpha0+
Build ID: e570cd7a293ceee175949dcc9656cdf776ae3c37
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2014-12-12_18:49:54
Comment 1 A (Andy) 2014-12-24 09:18:43 UTC
Reproducible with LO 4.4.0.0.beta1 and 4.3.4.1 (Win 8.1).

This seems to be reasonable for me.  Otherwise, the image gets stretched.
Comment 2 QA Administrators 2016-01-17 20:04:30 UTC Comment hidden (obsolete)
Comment 3 Commit Notification 2016-06-10 14:15:57 UTC
Gulsah Kose committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9fadde3c56a1e8bbb1ffe3ded861fbcd3252407

tdf#87667 If image is cropped, set cropped size as original size.

It will be available in 5.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Luke 2016-06-11 03:12:38 UTC
Yousuf, 
What's the use case you were thinking of for this feature? I've have quite a bit of experience creating slides and I think a simpler solution would be even more useful.

When dealing with image manipulation, the key feature that you want is a "Restore to Original". Whether it's a scaling that was not done proportionally or a cropping that is missing something, it's always nice to have a quick reset button to get the image back to its original state.

Instead of behaving differently for cropping and scaling, we should have one simple function, "Restore to Original" or "Reset Image".
Comment 5 Yousuf Philips (jay) (retired) 2016-06-12 09:49:53 UTC
(In reply to Luke from comment #4)
> Yousuf, 

Luke,

> What's the use case you were thinking of for this feature? I've have quite a
> bit of experience creating slides and I think a simpler solution would be
> even more useful.

The feature acts correctly in Writer's Image dialog's crop tab, so its about unifying its behaviour.

> Instead of behaving differently for cropping and scaling, we should have one
> simple function, "Restore to Original" or "Reset Image".

Yes we definitely need a "Reset Image" uno command that becomes active if an image is resized and/or cropped. Not sure if i've already filed a bug for it, but if not, please do file it and CC me. :D
Comment 6 Luke 2016-06-12 17:36:33 UTC
JP,
I filed Bug 100344 to create a "Reset Image" uno command. 

Gulsah Kose,
Are you interested in this? It's basically a broader, more useful version of .uno:OriginalSize.