Bug 99845 - Cropped Pictures Do Not Save as Cropped Pictures
Summary: Cropped Pictures Do Not Save as Cropped Pictures
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Draw-Images Image-Crop
  Show dependency treegraph
 
Reported: 2016-05-14 19:09 UTC by Susan
Modified: 2019-03-23 14:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
html woth uncropped screenshots in web browser (264.53 KB, image/png)
2019-03-21 19:20 UTC, Edgars Lazdāns
Details
html opened again in Writer (206.92 KB, image/png)
2019-03-21 19:21 UTC, Edgars Lazdāns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Susan 2016-05-14 19:09:02 UTC
Cropped Pictures Do Not Save in Crop Format. Reverts to Original in both Presentation and Draw.
Comment 1 Julien Nabet 2016-05-14 20:05:32 UTC
Which Libreoffice version do you use?
On which env are you? (Windows, Linux, MacOs)
Comment 2 Susan 2016-05-14 23:10:03 UTC
Version 5   Windows 10
(In reply to Julien Nabet from comment #1)
> Which Libreoffice version do you use?
> On which env are you? (Windows, Linux, MacOs)
Comment 3 Julien Nabet 2016-05-15 07:44:13 UTC
Which precise version? 5.1.2.2 the last one? 5.0.5.2 ? Other
You can check in Menu "Help" then "About LibreOffice..."

If it's not 5.1.2.2, I'd advise you to upgrade and give a try.

Also, in which format do you save? odp (by default format of LibreOffice for Impress and Draw), ppt, pptx (Ms Office format)?
Comment 4 Susan 2016-05-15 21:42:57 UTC
5.1.2.2

In MS Powerpoint, if you crop an image on a .pptx slide and right-click on the image and save the cropped image as .jpg, .bmp. .png. tif etc.. and the cropped image is stored just as it was cropped in the .pptx slide. You don't have to save the slide itself as an image or the .pptx, you can just save the modified/cropped image itself.

In LibreOffice, you have the same option to right-click on a cropped image in Draw or Presentation layout, and then save it out as a .png, .jpg, .bmp etc.

The problem is that the image that gets saved out is not the cropped version. It reverts to the uncropped version when you to save it. My general format choice is .jpg, however I assume it would treat any format the same way.

It's very common to crop images in Powerpoint, right-click on the image and save it out. I do that quite bit and am just disappointed that you can't do the same in LibreOffice, even though it looks like the utility is there, it just does not work properly.
Comment 5 Julien Nabet 2016-05-16 08:26:34 UTC
Ok thank you for your feedback.
On pc Debian x86-64 with LO Debian package 5.1.3RC2, I don't reproduce this.

I used created a brand new pptx file, put an image in it, saved it. Then I reopened it, cropped the image, saved the file, reopened the file, the image was cropped.
Perhaps I missed something.
Comment 6 Susan 2016-05-16 17:48:36 UTC
Yes, you didn't read what I wrote. I am not talking about saving the presentation or drawing with the image in it and reopening the presentation or drawing. I clearly and most detailed as I can be in English wrote that I am trying to save the IMAGE itself out of the .pptx via a right-click on the image. This has nothing to do with saving a .pptx or drawing file and reopening the master file containing the image.

Please actually read my previous comment it is about as clear as clear can be.  I am trying to save a picture (image) that was inserted into the .pptx and cropped. This is done with a right-click on the image itself.  You can do this very easily in MS Office Powerpoint and the image is saved as a cropped image. LibreOffice is not working correctly and the image saves  out as the original image file inserted in the .pptx, not the cropped version of the image.

Insert a picture into a blank .pptx. Crop the IMAGE. Right-click on the IMAGE and save it out to .jpg. (DO NOT SAVE THE .PPTX, THAT IS NOT WHAT NEEDS SAVING OUT). Insert the saved "cropped" image .jpg file back into the .pptx and you will see that the image didn't retain the cropping when you saved it out of the .pptx

I don't know how much more clear I can possibly be....

(In reply to Julien Nabet from comment #5)
> Ok thank you for your feedback.
> On pc Debian x86-64 with LO Debian package 5.1.3RC2, I don't reproduce this.
> 
> I used created a brand new pptx file, put an image in it, saved it. Then I
> reopened it, cropped the image, saved the file, reopened the file, the image
> was cropped.
> Perhaps I missed something.
Comment 7 Julien Nabet 2016-05-16 18:00:48 UTC
Thank you Susan for the detailed feedback.
I could reproduce this with save as png (since with jpg format, it created an invalid file).
So let's put this one to NEW.
Comment 8 Susan 2016-05-16 20:31:25 UTC
Thanks Julien.

I was able to save out a .jpg file with no problem or file type error. The problem is that it didn't save the cropped version in .jpg, it saved the image out as the original uncropped format in .jpg. Again, I had no problem getting the image to save. It just won't retain the cropped format.

This is what I described in Comment 4.. I didn't say that the file wouldn't save as .jpg. I said that it would not save as the cropped version.

Anyway, thanks for your time.
Comment 9 Julien Nabet 2016-05-16 20:41:34 UTC
About the fact the problem is, saving the cropped version doesn't work (and not jpg file) , I had understood.

About jpg problem, I had made a mistake. Obviously, if I insert png image then try to right-click and save in jpg format, it won't work. But the initial image is a jpg, it's ok.

In brief, I could reproduce your exact problem (+ there's no problem with jpg saving here).
Comment 10 Susan 2016-05-16 22:17:39 UTC
Okay. Thanks Julien!


In reply to Julien Nabet from comment #9)
> About the fact the problem is, saving the cropped version doesn't work (and
> not jpg file) , I had understood.
> 
> About jpg problem, I had made a mistake. Obviously, if I insert png image
> then try to right-click and save in jpg format, it won't work. But the
> initial image is a jpg, it's ok.
> 
> In brief, I could reproduce your exact problem (+ there's no problem with
> jpg saving here).
Comment 11 QA Administrators 2018-06-02 03:09:37 UTC Comment hidden (obsolete)
Comment 12 Edgars Lazdāns 2019-03-21 19:20:57 UTC
Created attachment 150156 [details]
html woth uncropped screenshots in web browser
Comment 13 Edgars Lazdāns 2019-03-21 19:21:30 UTC
Created attachment 150157 [details]
html opened again in Writer
Comment 14 Edgars Lazdāns 2019-03-21 19:26:57 UTC
What i did:
1) with Writer created table with two columns.
2) added text in the left, screenshot in the right
3) cropped screenshots (right click on image->crop)
4) saved document as html document
5) opened html document in web browser Chrome and Firefox

What i got:
1) images remained uncropped in web browser
2) after opening html document in Writer again, screenshots appeared uncropped

See attached PNG files
Comment 15 Brian 2019-03-22 19:31:50 UTC
I can confirm that a version of this bug remains in libreoffice 6.2.

Here is the detailed information on my libreoffice version and system:

Version: 6.2.1.2
Build ID: libreoffice-6.2.1.2-snap1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

For me this bug happens as follows:

1) insert image into libreoffice
2) crop said image
3) save document
4) open document
5) cropped image now contains the full original image but within the dimensions of the cropped image, so that the original image is distorted.

Thanks,
Brian
Comment 16 Julien Nabet 2019-03-23 11:59:13 UTC
Susan: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=dd74a659c60c1f0e7733d4244e808865377c6316, I gave a new try.

Here the steps I did with LO 6.1.5.2:
- launched Impress
- Menu "Insert" then ""Image..." (I chose a jpg)
- Crop image
- Right click on image, "Save..."
=> a dialog appears with:
"The image has been modified. By default the original image will be saved. Do you want to save the modified version instead?"
Yes/No
- Clicked Yes
=> a dialog box appears so you can choose location, name and format
- chose these options
=> another dialog appears (at least for jpg or png) for the compression options
- chose the options
It saved the modified version.

Would you have some time to give it a new try with a recent LO version?

Indeed, what Edgars and Brian described seem to me a bit different but I may be wrong. Anyway, I thought it may be interesting you give your opinion here.
Comment 17 Buovjaga 2019-03-23 14:16:47 UTC
No problem here.

No problem with steps in comment 15 either.

The issues from Edgards and Brian do not belong to this report anyway. They are encouraged to test with latest master and open new reports, if the issues persist: https://dev-builds.libreoffice.org/daily/master/?C=M&O=D

Closing as WFM.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 66b21521a95f7b2053aa99a23e0a4c34438af6c7
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 22 March 2019