Apache OpenOffice (AOO) Bugzilla – Issue 24224
Unused Bitmaps are stored and and blow up document size
Last modified: 2013-02-24 21:21:58 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.
Hi Bjoern, please have a look. The bitmaps are saved even if they are not needed any longer. Frank
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).
As OOo 2.0 is coming nearer in great steps, I suggest to target this to 'OOo Later'.
changed summary to something more meaningful
May also relate to Issue 50899 - 'File contains deleted graphics', where these background images accrue in the odf file and are not removed. Regards Andrew
change owner
reset to new
This is a duplicate of Issue 50899 (which has already 3 votes).
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 ***
closing duplicate issue