Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index

On 28/02/2014 12:16 pm, Cley Faye wrote:
I don't know how often this feature is requested for odt files. I know that for pdf you can set parameters for the image compression, and it make sense since the resulting file is unlikely to undergo future changes, but it's less obvious for file formats that are not at the "end" of the editing line. It's probably better to work with the "highest" resolution needed, and produce smaller files as needed.
Fair point. However most documents reach a finished state, at which point they do not need to stay bloated.
Hmm. As a "proof of concept", I put together a java program that take an odt file as input. You can then set the "requested" DPI and jpeg quality, and save. At this point, every pictures that are larger than needed (that's why we need DPI) are resized, and all pictures are compressed using either jpg or png, whichever gives the smalles size. Something as simple as that already have issues, like when there's transparency involved. Also, it's only tested on a few files (including for funsies). If anyone want to give it a try here's the jar. It's highly unlikely to corrupt your source file (the source file is never ever written), but there's also no guarantee that the output will work ;) <> For example, on the writer guide linked before, it goes from 13MB to 9MB with default settings. Of course it's not the best example: all pictures are already reasonably sized, and it's mostly screenshots so the quality drop is very noticeable... Anyway, if anyone want to look at the source code (without reversing the jar :D) I'll provide them. But know that it's mostly an ugly hack just to see how well it would work :)
Cley, a good "proof of concept". It needs lots of work but certainly as a concept it gains my approval.


Email from does not necessarily represent the official
policy of SETEC Pty Ltd.
See for details.

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.