[Updated 4/7/06 - New 'images.zip' for v2.0.3]
OpenOffice (OO) contains many thousands of .png images used for icons and similar graphics. I've optimised these files using a brute force approach (at points with 5 computers running!). Each image has been compressed with 3x different PNG compression engines and many different methods. I have also optimised maybe a few hundred images by hand- ensuring that greyscale / monotone images do not contain a coloured transparency (i.e. magenta). Throughout the process I've been vigilant to ensure no faults crept in... but nothing in life is 100%
So the result of this effort? The 7,779 files were compressed from 3.88MB to 2.23MB (57%). To stress the point, this is lossless. However, due to the large number of image files, OO stores them as a single zip archive to overcome inefficiencies in filing systems (On NTFS the individual files require ~31MB of real disk space). So the final compression for the images.zip is from 4.20MB to 3.09MB (74%). Although this has only saved ~1MB, the zip archive is actually now set to ‘store’, i.e. is purely a wrapper and has minimal overhead when decompressing. The decompression overhead is now only incurred when each actual image is rendered from a .png to the on-screen display. This may improve start-up time and reduce running memory very, very slightly- but hasn’t been tested yet.
I am keen to have the good folks at OO.org integrate this mod, since 1MB x 50,000 downloads does add up. However, such a large scale change requires quality assurance beyond just some bloke (me) saying it’s ok! Therefore, I warmly invite you to Beta test this image set and let me know if you encounter any problems. But please note, that this is in no way endorsed by John Haller or PortableApps.com.
To install, download the archive [updated: 04/07/06 ~1.9MB] which will need to be placed in the following directory: …\openoffice\share\config. You should first rename your current ‘images.zip’ to something like ‘imagesOLD.zip’ to backup, then rename the downloaded archive to 'images.zip'. You will then need to refresh the OOo image cache, as described in the post below.
I look forward to your feedback,
PS- In case people want to build their own, you can download the source files here.
I had assumed that the PNG decoder in OO was fairly versatile- but it looks like it might have some limitations in terms of alpha transparencies/ bit depths. As a result, some of the icons from the 'Drawing' toolbar look a little chunky (Eg. 'Block Arrows'). Nothing too major...
After some playing around, it seems there are various limitations (/errors) to png decoding in OO. Since this affects the whole suite, including images in documents as well as the toolbars, I think it is something OOo really need to fix. I will put together a test case and raise the issue... however, OOo developers seem to move rather slowly (think years rather than weeks!)...
Please feel free to still try out this images.zip, but some icons might look more chunky than they should. I am interested in any other problems.
This issue has been raised with OOo. Please feel free to Vote for this issue. Also, if you are interested in some other png related Issues, have a look at IssueTracker by my user id (ace_dent) here.
Another point: OpenOffice maintains a cache of images, which will need to be deleted to see the effects of updating 'images.zip'. (Please note, this could be rather dodgy- so I accept no responsibilities for your actions... although it works fine for me).
For an installed copy of OO:
"Documents and Settings\XXX\Application Data\OpenOffice.org2\user\config\imagecache" where XXX is user name.
For Portable OO:
I believe this is unnecessary when 'images.zip' is replaced after an instal before OO is run for the first time.
I have posted a new thread under 'Development', for details on the optimization process and tools I used. Here.
also improved startup time
Firstly, thanks to 'DigeratiPrime' for taking the time to test this!
I have released v2 of the optimized 'images.zip' and updated the first post. This is intended for use with OOo 2.0.2 when it is released, but has been tested with 2.0.1 ok... please feel free to test it out now!
Main changes to 'source':
- Many icon fixes for the original OOo distribution. (All raised as issues here).
- Hand tweaking of various images for improved compression.
The next release of OpenOffice will have the capability to switch Icon Themes. This means that High Contrast (HC) icons will be a seperate theme, and the HC icons can be removed from the default 'images.zip' (~50% of the images). Therefore, my new v2 image set has all the HC images stripped out, at the cost of accessibility to those with visual disabilities. I have also removed:
- Localization graphics (most people will be able to translate the default GUI).
- Graphics required for 'Easter Eggs'
- Sun(TM) specific banners.
This reduces the final package from 4MB to just 1.6MB!
//UPDATE (22/2/06) Problems found so far:
- Graphs in Calc not displayed (i61498, fixed in v.2.b2)
- Paste Special not working (i61500, fixed in v.2.b2)
- Spell checking broken (i61634, fixed in v2.b3)
- Cannot add custom toolbar items (i61804, fixed in v2.b3)
- Won't display Hyperlink toolbar (investigating)
- Issues with 3D-Settings toolbar (investigating)
In the meantime, if you hit any other problems please let me know and revert back to your 'imagesOLD.zip'. Cheers //
PS- Download links updated in first post.
thanks again. using this with 2.0.2rc4
The new 'images.zip' (link in first post), no longer removes icons since this may cause problems; It is nice and safe. However, if you really want the smallest install around and don't mind the occasional glitch (You have been warned!)...
I present the Xtreme edition, (1MB). Play safely
I am still working with OOo developers to get these and other optimizations into the base code.
Thanks for your continuing work on this. I hope the OOo devs get your 'safe' changes into the tree with the next release. You'll be saving file storage all over the world and helping out the portable version.
Sometimes, the impossible can become possible, if you're awesome!
My post on general PNG optimization (Here), seems to have been trimmed. Is there anyway to get this back? I don't have a back-up ...
Unfortunately, it looks like it got truncated either during an upgrade or when there was corruption issues before the server move (when we were on the shared host... the db got corrupted a couple times). I hit the table itself via phpMyAdmin and what you see on the site is all that's in the table. I also checked Google's cache and Archive.org, and neither have the post archived. So, unfortunately, it looks like it's gone
Incidentally, that's one of the reasons I moved to such a solid server with a solid host like RackSpace. I'd like to be sure we have all this great information available for years to come.
Sometimes, the impossible can become possible, if you're awesome!
Ok, cheers John.
I will re-create the guide (and back it up!) when time allows.
What did you use to create the Zip file? I changed a couple of Icons and re-created the Zip using different Windows Zip tools. Now when I launch the apps there are no Icons on the toolbar / menu and nothing in the imagecahce folder. My guess is OOo cant open my zip file. Any ideas?
Sorry for the delay, I have been busy with other things of late.
I also encountered such problems at first, because many zip archivers add an extra level of folder recursion ('images.zip'>'images'>'avmedia...'). Make sure you haven't accidentally done this. Otherwise OOo just uses a standard zip file.