Apache OpenOffice (AOO) Bugzilla – Issue 10776
Inefficient saving of graphics file
Last modified: 2013-08-07 14:38:26 UTC
A given file in .sxw format is 50K, while in .doc format it is 200K. Then a graphic is added, a 4 Meg .tif file. the resulting file is 4 Meg in .sxw, while .doc at least in Office 2K delivers some compression and comes out as a 700K file for the text with image, in other words the compressed graphics file results in a 500K increase of the file size to represent a 4 Meg image file. In short, for one time a certain other word processor is doing something efficient, and we don't want to let them get away with it. :-)
curiously, I have noticed that after the file grew beyond a certain size, OOo writer once again became more effective than MSW, and now my file size once again is smaller than MSW, whereas in older versions of this file it is still substantially larger.
Created attachment 5479 [details] text file, today's test case
Created attachment 5521 [details] text file
this file is the perfect example, i've tracked it throughout it's growth, and presently in .sxw it is 4,193,982 bytes .doc (97-XP) 1,591,808 bytes but with out the graphic (one!) it reverses completely, and the Open Office format is much more efficient. .sxw 208,395 bytes .doc 1,074,176 bytes. In short oo is extraordinarily inefficient by just the addition of the one graphic.
Created attachment 6717 [details] Fixed version of GSP V0.99.004.sxw
Hi, I had problems downloading the GSP V0.99.004.sxw file, because you chose text/plain as mime type, and Netscape decided to open this file in a normal browser window. I saved that file and was able to look into the underlying archive of the *.sxw file. Unfortunately the file in the zip-archive had a crc error, and I wasn't able to extract the picture from that archive. But *amazingly* OOo 1.1 beta2 was able to load the file, and after saving it again, the zip-archive was repaired :-) I uploaded the repaired file as "GSP V0.99.004_fixed.sxw" The problem why the OOo *.sxw file is so big arises from the fact that the picture in the archive is not compressed. Compressing the picture seperately with zip shows that the filesize goes down from ~4MB to ~500kB. With this compression we would be better then MS) I confirm the issue, and target it to 1.1, because I think it's no big deal to enable the compression for picture. If it is, please retarget. (I know that most picture formats are already compressed, but some aren't, and then it helps doing it.)
Change the version to OOo 1.1beta2.
HI->MIB: I've minimized the doc to 2 pages include the graphic and the file size is nearly 4MB as *sxw and *sdw. This is as 7-times higher as when I save it as *doc file.
Changed owner, target and priority.
Accepted, there are two possibilities: it is possible to set the packed flag at the xml graphic stream if storing tif graphics as we do it for metafiles, this would zip all tif graphics. The second possibility is to store png instead of tif as it is done by Word, this would create files having a little bit smaller filesize than normal zipping, because especially 24bit graphics are stored using the png filter type 4 (paeth). One exception: multipage tif files always have to use the first possibilty, so we do not lose graphic information. My tendency is to replace tif by png.
<i>My tendency is to replace tif by png.</i> PNG's rock. I vote for the PNG solution. :)
.
I like Png too. and next year I hear that Gif is free, I hope we can prepare for it too
*** Issue 9176 has been marked as a duplicate of this issue. ***
SJ->SAB: Thanks for taking of this issue. As you can read we came to the conclusion to store png instead of single paged tiff files. I don't know where exactly the saving process is being done, but at least the GetLink method at the Graphic class is being called to retrieve the original tiff file. The Graphic class is located in vcl/source/gdi/graph.cxx. To determine if the graphic is single paged or not you can call the IsAnimation method at the Graphic.
I take it
SJ and I think it is more important than P4, so changed to P3
nice to have => set to P4
OOo 2.0.1
Retargeted to Office Later, due to lack of resources we have to concentrate on the most relevant issues for the next micro update.
May also be relevant to: Issue 15508 - Break link converts bmp, jpg, png and gif to png format Cheers Andrew
Reset assignee on issues not touched by assignee in more than 2000 days.