Bug 119100

Summary: Removing an imported bitmap from a frame does not remove bitmap from .odt file.
Product: LibreOffice Reporter: VlijmenFileer <martin.van.boven>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: martin.van.boven, rb.henschel
Priority: medium    
Version: 6.0.4.2 release   
Hardware: All   
OS: All   
URL: https://ask.libreoffice.org/en/question/161953/how-to-delete-imported-but-unused-bitmap-from-writer-document/
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=92796
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 47148, 107943    
Attachments: Five files, from new empty document, to document with frame and Bitmap removed again. The filesize has not shrunk. The image ("Bitmap") file used.

Description VlijmenFileer 2018-08-05 03:34:19 UTC
Created attachment 143973 [details]
Five files, from new empty document, to document with frame and Bitmap removed again.  The filesize has not shrunk.  The image ("Bitmap") file used.

Removing an imported bitmap from a frame does not remove bitmap file from .odt file.


Actions to reproduce:

Add a frame:
Insert | Frame-> | frame...

Add a background to it, in LibreOffice parlour a "bitmap" that must first be "imported", and then added as "Area":
<Select frame> | Properties... | Area | Bitmap | Import

Observations:
* The imported bitmap becomes visible as background to the frame, but is not visible in the Bitmap pictogram list in the Area tab.
* The document grows in size according to the size of the imported image.

Actions to reproduce:

Remove the background:
<Select frame> | Properties... | Area | Bitmap | None

Observations:
* The background disappears.
* The filesize remains the same, even if the Bitmap is not being used anywhere else in the document.
* There is no interface to list or remove the Bitmap.
* The file and reference to it can be found inside the .odt file in a folder ./Pictures and in Styles.xml.


IMO this is a bug, as it lets a Writer file grow without limit and without method to prune it.
* LibreOffice should add imported Bitmaps to the Bitmaps list, or to a more general management GUI for imported data.
* LibreOffice should have an option to manually manage Bitmaps contained in the document, used or not.
* LibreOffice should perhaps automatically remove unused Bitmaps from the document file.
Comment 1 Buovjaga 2018-09-02 16:31:35 UTC
Confirmed in Ask -> NEW
Comment 2 Olivier Hallot 2019-05-29 12:48:59 UTC
I think this is related to bug#92796.
Comment 3 Pierre Marty 2020-05-26 09:18:21 UTC
This bug is still present in:

Version: 7.0.0.0.alpha1+
Build ID: 983db96a17630be906b868d2be811663f0d846f6
CPU threads: 12; OS: Linux 4.4; UI render: default; VCL: x11
Locale: en-US (C.UTF-8); UI: en-US
Calc: threaded
Comment 4 Regina Henschel 2020-09-13 00:04:13 UTC
The problem is not related to ODF, so I remove blocks 108198.
Comment 5 Justin L 2021-03-12 07:24:37 UTC

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