Bug 150040 - Feature Request (Writer): Delete parts of an image after cutting
Summary: Feature Request (Writer): Delete parts of an image after cutting
Status: RESOLVED DUPLICATE of bug 117082
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Image-Compression-Dialog
  Show dependency treegraph
 
Reported: 2022-07-18 08:12 UTC by BDF
Modified: 2022-08-01 10:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example image (61.42 KB, image/png)
2022-07-18 08:12 UTC, BDF
Details
example image in ODT (73.97 KB, application/vnd.oasis.opendocument.text)
2022-07-18 08:14 UTC, BDF
Details
example image exported to PDF (51.99 KB, application/pdf)
2022-07-18 08:15 UTC, BDF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BDF 2022-07-18 08:12:08 UTC
Description:
When you cut an image the part of the image that is no longer visible is not deleted. This can be a potential security risk and the files use more data.

The suggestion is to have an option to delete or clear the parts of the file that are not visible.

Steps to Reproduce:
1. Take an image
2. Cut it in Writer
3. Export it as PDF or save it as file

Actual Results:
The image can be restored in full size even it is not visible. The full images takes up space that is not needed.

Expected Results:
Option to delete the parts that were cut away in the odt file (saves space).
Option to delete the parts that were cut away in the pdf export.


Reproducible: Always


User Profile Reset: No



Additional Info:
The image can be 'uncut' or saved to a file in writer if you have the original file. If you save the file, Writer even asks you if you want to save the full size.
When the file is exported to a pdf, the large image is kept. This could lead to security issues and increases file size.
Since the image is just cropped to a smaller size but is included in full size, tools like https://pdfcandy.com/extract-images.html or https://tools.pdf24.org/en/extract-images can be used to extract these images.

I am not aware that there is an option to delete the parts of the image that were cropped out for the odt file to save space and don't include unwanted parts of the image.
I am not aware that there is an option to delete the parts of the image that were cropped out for the pdf export.


General thoughts:
- If this option exists, it should be more obvious

- You should be able to edit all images at once (imagine with a document with ~50 images) and one by one.

- There should be an option to delete the cropped out parts by default as config or maybe even to not be able to enable it at all for security reasons (eg. for Tails OS so that you can not forget to enable it)

- The cut should not be applied right away. So that you can enlarge the image when you cut it a little bit too far. The point when the section of the image is deleted would on user activation or when the file is saved to the disk. User activation would be so that you can finish the file and cut it when everything is ready. Save to disk is if the [cut + delete] option is on by default.

- delete vs. clear: The best thing would be if the cropped parts would be deleted. If this is not possible somehow it could be cleard/overlayed with a eg. black or white layer so that the cropped part can no longer be recovered.

- tool access could be with via the existing icon with a drop down menu or eg. Ctrl click of the button.
Comment 1 BDF 2022-07-18 08:12:43 UTC
Created attachment 181301 [details]
example image

example image that is used in the following files
Comment 2 BDF 2022-07-18 08:14:08 UTC
Created attachment 181302 [details]
example image in ODT

The example image cropped to size in an odt file
Comment 3 BDF 2022-07-18 08:15:31 UTC
Created attachment 181303 [details]
example image exported to PDF

The cropped example image in an ODT exported to a PDF.

Offline and online tools like https://pdfcandy.com/extract-images.html and https://tools.pdf24.org/en/extract-images can be used to extract the image in full size.
Comment 4 Heiko Tietze 2022-08-01 10:48:45 UTC
Keeping the cropped part is a convenience feature, at least we do not change the image automatically. But it should essentially be possible via Format > Image > Compress (with several tickets around). But it doesn't work for some reason.

See also:

Bug 132592 - Original image size off after compression without reducing the image resolution
Bug 107875 - Ability to compress all document images with options set in Compress Image dialog
Bug 117082 - Add the option to remove cropped areas to the "Compress Image" dialog

Making this ticket a duplicate of the latter.

*** This bug has been marked as a duplicate of bug 117082 ***