Issue 24224 - Unused Bitmaps are stored and and blow up document size
Summary: Unused Bitmaps are stored and and blow up document size
Status: CLOSED DUPLICATE of issue 50899
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: IngridvdM
QA Contact: issues@graphics
Depends on:
Reported: 2004-01-08 23:09 UTC by scagni
Modified: 2013-02-24 21:21 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description scagni 2004-01-08 23:09:42 UTC
I happened by chance to try some bitmap fill for part of graphs created with the
spreadsheet module. However, I did not like it and reverted to single color area
fills. However, when saving the document after this, its size was significantly
increased. By unzipping and examining the xml file I discovered the problem: the
folder for the above graph still contained a copy of all the bitmap fill I tried
but did not use in the end! Even worse, those bitmaps were replicated in the xml
a few times since I copied and pasted the graph in various parts of the document
after trying - but rejecting! - those bitmap fills. In all I had some 1.1 MB
added to the file made by 8 replicas of the 3 bitmap files tried for the fills.
And this  without ever using any of these bitmaps for the actual document!
To summarize, the xml should not contain:
- copies of bitmaps not actually used in the document; when any such bitmap
previously used is dismissed it should be deleted from the xml file at the next
"save" operation;
- replicate copies of identical bitmap files used in various parts of the
document; for example, if I make a presentation file cointaining some 20 graphs
from the spreadsheet app, and all of them have the same 80KB background bitmap
image, saving this same bitmap separately for each graph means adding some 1.6
MB to the document size - the bitmap should be inserted in the xml file only
once as long as it is exactly the same in different instances.
Comment 1 frank 2004-01-12 10:47:28 UTC
Hi Bjoern,

please have a look. The bitmaps are saved even if they are not needed any longer.

Comment 2 bjoern.milcke 2004-01-12 12:34:42 UTC
This is indeed a bug.  The GraphicsManager should handle all bitmaps and avoid
saving duplicates.  I am not sure if does also allow to share the same bitmap
between two different files, because AFAIK the images are always stored in the
same substorage as the OLE-object (which means, as one chart can not access the
substorage of another chart, that this sharing would be impossible).
Comment 3 bjoern.milcke 2004-01-21 18:26:24 UTC
As OOo 2.0 is coming nearer in great steps, I suggest to target this to 'OOo Later'.
Comment 4 IngridvdM 2006-03-17 18:27:26 UTC
changed summary to something more meaningful
Comment 5 ace_dent 2008-04-27 21:13:11 UTC
May also relate to Issue 50899 - 'File contains deleted graphics',
where these background images accrue in the odf file and are not removed.

Comment 6 IngridvdM 2008-07-03 11:39:18 UTC
change owner
Comment 7 IngridvdM 2008-07-22 14:21:33 UTC
reset to new
Comment 8 hagar_de_lest 2010-12-07 16:41:54 UTC
This is a duplicate of Issue 50899 (which has already 3 votes).
Comment 9 IngridvdM 2010-12-08 10:55:09 UTC
Exceptionally I set this older bug to duplicate, as the newer one has gathered
some votes.

*** This issue has been marked as a duplicate of 50899 ***
Comment 10 IngridvdM 2010-12-08 10:55:49 UTC
closing duplicate issue