Bug 134210 - FILEOPEN PPTX: Image shown with wider aspect ratio and different clipping - cropping not being applied
Summary: FILEOPEN PPTX: Image shown with wider aspect ratio and different clipping - c...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Gülşah Köse
URL:
Whiteboard: target:7.2.0 target:7.1.1 target:7.1....
Keywords: filter:pptx
Depends on:
Blocks: PPTX-Images
  Show dependency treegraph
 
Reported: 2020-06-21 23:04 UTC by Gerald Pfeifer
Modified: 2023-08-08 07:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample PPTX document (1.42 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-06-21 23:04 UTC, Gerald Pfeifer
Details
Visual comparison Office 365 vs LibreOffice (46.57 KB, image/png)
2020-06-21 23:04 UTC, Gerald Pfeifer
Details
Second sample document (4.50 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-24 22:45 UTC, Gerald Pfeifer
Details
Second sample document, slide 1 in Office 365 (944.17 KB, image/png)
2020-10-24 22:48 UTC, Gerald Pfeifer
Details
Second sample document, slide 2 in Office 365 (3.49 MB, image/png)
2020-10-24 22:49 UTC, Gerald Pfeifer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2020-06-21 23:04:11 UTC
Created attachment 162277 [details]
Sample PPTX document

Open the PPTX document in LibreOffice the image appears with a wider aspect
ratio (so the person looks heavier) and a different clipping.
Comment 1 Gerald Pfeifer 2020-06-21 23:04:42 UTC
Created attachment 162278 [details]
Visual comparison Office 365 vs LibreOffice
Comment 2 Xisco Faulí 2020-06-22 13:21:32 UTC
Not a bug, the guy just put on weight. Just kidding, reproduced in

Version: 7.1.0.0.alpha0+
Build ID: 70479e1f4cb3c120f46239a648e65f035af2922d
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 Jeremy 2020-09-03 22:52:43 UTC
I have the same problem, with .pptx files containing cropped circular (or other shaped) images imported into Libre Office. The image, as it appears on the presentation file imported into Impress, is distotrted, and not as expected, as the cropping specified within the Powerpoint file is not being applied by LO Impress.  

I'm running LO Version: 6.4.6.2 (x64)
Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded 

On looking into this, within Impress, there is a 'shape' (circular or otherwise) with Area filled by a Bitmap, which is the whole of the original image used (when the .pptx file was created in Powerpoint, and present witnin the .pptx archive file), distorted to fit the shape. (Note: it is not included in the menu of Bitmaps) 

Problem is that the Bitmap as used is distorted, and is not the portion of the image selected by the creator of the .pptx file.

His description of his process "I created a shape (circle) then used format shape, then filled it with a picture from a file. To move the picture around I used the crop function to resize and move."

The underlying problem is that the cropping information is not being applied by Impress in using the image as area bitmap. Whether this is because it is not imported into LO, or then not being used, is beyond my knowledge. 

In the case of Gerald's sample, there is is a 156*238 portrait image file (image13.png) which is being stretched to square format for the circular shape, rather than cropped as the designer intended.   

I have amended the bug summary slightly: if I were raising this myself I would probably summarise it as 'Image in imported .pptx file used as Shape Area Bitmap not cropped as specified when file created in Powerpoint'.  But I will leave it to someone with more experience to change it if appropriate.
Comment 4 Gerald Pfeifer 2020-10-24 22:45:48 UTC
Created attachment 166681 [details]
Second sample document

I'm adding another document with a few further examples. 

In addition to the different ratio (at least one picture has a smaller
one, so I'm changing the title of this report) one of the images there
appears vertically mirrored and some are colored instead of grey -- so
I am wondering whether there is a set of attributes missed upon import?
Comment 5 Gerald Pfeifer 2020-10-24 22:48:18 UTC
Created attachment 166682 [details]
Second sample document, slide 1 in Office 365
Comment 6 Gerald Pfeifer 2020-10-24 22:49:03 UTC
Created attachment 166683 [details]
Second sample document, slide 2 in Office 365
Comment 7 Aron Budea 2020-10-26 00:42:57 UTC
> I'm adding another document with a few further examples. 
> 
> In addition to the different ratio (at least one picture has a smaller
> one, so I'm changing the title of this report) one of the images there
> appears vertically mirrored and some are colored instead of grey -- so
> I am wondering whether there is a set of attributes missed upon import?
This is actually different from the bug initially reported. The issues in this sample are regressions, and from the same commit as bug 134209 (the summary already captures one of the issues: Image shown as color instead of black&white). Please upload/link the sample in the other bug report, and mark the related attachments as obsolete here.

Regarding the original bug, the face started appearing in 3.5.0.3, and it was already distorted, so adjusting version to inherited from OOo.
Comment 8 Commit Notification 2021-01-21 09:53:16 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2c96bd26ec488d865370fe9d394e7c4e228e05ab

tdf#134210 Import support for custom stretch values.

It will be available in 7.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 9 Xisco Faulí 2021-01-25 09:24:43 UTC
I do confirm the issue is fixed in attachment 162277 [details]

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 0426748927919dbfd4cf5c0bb904e21a90d6c9d7
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

but not in attachment 166681 [details]
Comment 10 Commit Notification 2021-01-28 14:46:44 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/62ee7fdce30d8e1deb6df80b73577ef6164a5a90

tdf#134210 Apply mirror property to custom cropped graphic.

It will be available in 7.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 11 Commit Notification 2021-02-03 10:24:41 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/28bdc7916e1875e6827cae3b70977ad6c8c42824

tdf#134210 Import support for custom stretch values.

It will be available in 7.1.1.

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 2021-02-10 06:05:22 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134210 Import crop position of bitmap filled shape.

It will be available in 7.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 13 Commit Notification 2021-02-10 07:09:14 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134210 Handle greyscale effect on bitmap filled custom shapes.

It will be available in 7.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 14 Commit Notification 2021-02-11 14:06:10 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134210 Better testing for cropping bitmap of custom shape.

It will be available in 7.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 15 Xisco Faulí 2021-02-16 10:54:31 UTC
wow, everything looks fantastic now in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: a5d68a4f959804f93ddda61a45cedaadb504e3f2
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Gülşah Köse, thanks for fixing this issue!!
Comment 16 Commit Notification 2021-02-16 11:00:46 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/5f4808d7536a4c551c8764ac2ac6be30ad975f69

tdf#134210 Apply mirror property to custom cropped graphic.

It will be available in 7.1.2.

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 17 Commit Notification 2021-02-16 11:01:58 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/33e69fb9ef450169e7d85ae3215fd9a4fc8082c2

tdf#134210 Import crop position of bitmap filled shape.

It will be available in 7.1.2.

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 18 Commit Notification 2021-02-16 11:22:32 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/65c98b76fa95fec0ff225ae032f010e5c0f246f0

tdf#134210 Handle greyscale effect on bitmap filled custom shapes.

It will be available in 7.1.2.

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 19 Commit Notification 2021-02-16 11:22:43 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/6a5027f5fc84deab83f08b81a01c5acca2cfd9f6

tdf#134210 Better testing for cropping bitmap of custom shape.

It will be available in 7.1.2.

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 20 Commit Notification 2022-06-17 12:26:19 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5772cef244dbee5834efbc693bc714d89ae6301d

tdf#134210: Reimplement cropping from srcRect and fillRect

It will be available in 7.5.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 21 Commit Notification 2022-06-20 09:27:43 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6ab56a4fc946f6294513f23a3ea47aa0aa154b7d

tdf#134210: Reimplement cropping from srcRect and fillRect

It will be available in 7.4.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 22 Commit Notification 2022-06-28 16:19:03 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/66ae8a2c0e6d01d06a01fa877cf03507c0656f8d

tdf#134210: Reimplement cropping from srcRect and fillRect

It will be available in 7.3.5.

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.