Bug 84562 - FORMATTING: Crop Picture corrupted after save to pptx and re-open in libreoffice
Summary: FORMATTING: Crop Picture corrupted after save to pptx and re-open in libreoffice
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.2.6.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Crop
  Show dependency treegraph
 
Reported: 2014-10-01 18:31 UTC by Morgan Garcia
Modified: 2018-03-08 12:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Simple example libreoffice presentation document (28.64 KB, application/vnd.oasis.opendocument.presentation)
2014-10-01 18:31 UTC, Morgan Garcia
Details
Resulting .pptx file corresponding to Example001.odp (34.32 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2014-10-01 18:32 UTC, Morgan Garcia
Details
Another example .png, .odp, and .pptx (1.03 MB, application/gzip)
2014-10-28 01:03 UTC, Morgan Garcia
Details
Another example .jpg, .odp,. and .pptx (114.07 KB, application/gzip)
2014-10-28 01:04 UTC, Morgan Garcia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Morgan Garcia 2014-10-01 18:31:18 UTC
Created attachment 107204 [details]
Simple example libreoffice presentation document

Create a presentation that includes an image that has been cropped.  Save the file as a "Microsoft PowerPoint 2007/2010/2013 XML (.pptx)" document.  Exit libreoffice.  Open the saved .pptx document using libreoffice ('libreoffice filename.pptx').  Observe that the display of the cropped image has become corrupted.  Viewing the 'Crop Picture...' settings, it apperas the Crop Bottom changes from 0.92 -> 1.69 and the Scale Height changes from 146% to 830%.

A simple example file - Example001.odp - which is working with .odp and the resulting .pptx file (Example002.pptx) are attached.
Comment 1 Morgan Garcia 2014-10-01 18:32:55 UTC
Created attachment 107205 [details]
Resulting .pptx file corresponding to Example001.odp
Comment 2 raal 2014-10-21 12:26:53 UTC
With LO 4.3.2.2, windows7 after reopening pptx file is image lost.
Duplicate of bug 70657 ?
Comment 3 Morgan Garcia 2014-10-21 16:03:27 UTC
(In reply to raal from comment #2)
> With LO 4.3.2.2, windows7 after reopening pptx file is image lost.
> Duplicate of bug 70657 ?

It is possible you are seeing another bug with the attached file. However, the problem reported here is not that the image is lost, it is just that the image is improperly cropped and thus becomes invisible. If the crop is disabled (select an area that encompasses the image to select the object, right click menu to select Crop Picture..., click Original size), then the image becomes visible again. The image is in the .pptx file, but cannot be seen because the cropping details become corrupted.
Comment 4 A (Andy) 2014-10-24 20:15:09 UTC
Reproducible with LO 4.3.2.2 (Win 8.1) with the test image in the attached sample file, even if I copy it to a new presentation.  To find it, you need to look where mouse pointer changes and then make a right mouse click or copy it to a new presentation with no text elements at all and then select the whole slide to find it.  With a right mouse click you can then go to CROP PICTURE and there you can see that it was changed when saving as pptx.

But strange is, that I can't reproduce it with new presentation with a new jpg or png picture.

@Morgan: Is there any special thing with this image?  Can you also reproduce it with a new e.g. jpg image?
Comment 5 Morgan Garcia 2014-10-28 01:02:51 UTC
(In reply to A (Andy) from comment #4)
> @Morgan: Is there any special thing with this image?
> Can you also reproduce it with a new e.g. jpg image?

No, there is nothing special about the image.

I originally saw the problem when creating a presentation that included some screenshots. Rather than use the original screenshot, I created a new .png image to better demonstrate the problem.

This seems to be reproducible for me when using any .png image.  I reproduced this now using a new image. I viewed an image and did a screenshot, imported the resulting .png file into a fresh presentation, did a crop to chop off the bottom black bar, saved the presentation as a .PPTX and 'voila'.
I am attaching the .png, the .odp, and .pptx as ya-png-example.tar.gz

It seems to happen with .jpg images also.  I included the .jpg image (instead of the screenshot of the jpg) in a fresh presentation and cropped out the beverage, save the presentation as a .PPTX and saw the problem.
I am attaching the .jpg, the .odp, and the .pptx as ya-jpg-example.tar.gz
Comment 6 Morgan Garcia 2014-10-28 01:03:50 UTC
Created attachment 108540 [details]
Another example .png, .odp, and .pptx
Comment 7 Morgan Garcia 2014-10-28 01:04:23 UTC
Created attachment 108541 [details]
Another example .jpg, .odp,. and .pptx
Comment 8 Pascal Hingamp 2015-06-27 13:37:18 UTC
(In reply to Morgan Garcia from comment #6)
> Created attachment 108540 [details]
> Another example .png, .odp, and .pptx

I get similar type of issue even without going through the .pptx intermediate! Just by opening the same file in two different version of LO:
https://bugs.documentfoundation.org/show_bug.cgi?id=92379
Could these bugs be linked? Currently making Impress unusable for me since I usually have cropped images in all my slides.
Comment 9 QA Administrators 2016-09-20 10:11:50 UTC Comment hidden (obsolete)
Comment 10 Buovjaga 2018-03-08 12:43:27 UTC
No problem anymore.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: b8fe96f1da2c42c04a8094ca8c57d49763b7bded
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 8th 2018