Bug 99135 - Cropping has no effect on image contents
Summary: Cropping has no effect on image contents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.2.0 target:5.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-07 08:20 UTC by vsza+tdf
Modified: 2016-10-25 19:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
OOXML document that produces the issue (11.84 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-04-07 08:20 UTC, vsza+tdf
Details
Screenshot in LibreOffice 5.1.0.3 / Linux / x86_64 (20.00 KB, image/png)
2016-04-07 08:21 UTC, vsza+tdf
Details
Screenshot in Microsoft Word 2013 / Windows 10 / x64 (10.41 KB, image/png)
2016-04-07 08:21 UTC, vsza+tdf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vsza+tdf 2016-04-07 08:20:39 UTC
Created attachment 124150 [details]
OOXML document that produces the issue

Images that are cropped in Microsoft Office appear in the correct size but without the contents cropped in LibreOffice, resulting in wrong aspect ratio and otherwise "hidden" parts being visible.

I attached a simple PoC, where the image is cropped to include only the black part (see screenshot from MSO 2013), and while the image has the same size in LO (see screenshot from LO 5.1.0.3), the yellow part is visible as well.
Comment 1 vsza+tdf 2016-04-07 08:21:08 UTC
Created attachment 124151 [details]
Screenshot in LibreOffice 5.1.0.3 / Linux / x86_64
Comment 2 vsza+tdf 2016-04-07 08:21:36 UTC
Created attachment 124152 [details]
Screenshot in Microsoft Word 2013 / Windows 10 / x64
Comment 3 Miklos Vajna 2016-04-08 18:52:45 UTC
Confirmed.
Comment 4 Commit Notification 2016-04-12 07:21:35 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#99135 VML import: handle image crop

It will be available in 5.2.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 5 Miklos Vajna 2016-04-12 07:23:43 UTC
Will backport to libreoffice-5-1 and perhaps to libreoffice-5-0 later.
Comment 6 Commit Notification 2016-05-02 07:42:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d447579a6193d8bfe020e86c930a90a627969e1&h=libreoffice-5-1

tdf#99135 VML import: handle image crop

It will be available in 5.1.4.

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.