Search code examples
imagemagickdeepzoomopenseadragonseadragon

Optimize size of DZI rendered


I am currently testing magickSlicer for converting large jpeg files to DZI. It works nice.

However, i am facing a problem with the size of rendered DZI. For exemple, for an orginal jpeg file weighting 10Mo, the rendred DZI folder weight 26.2Mo with default option (-w 256 -h 256). If I change options width and height to 512x512 the DZI folder weight 18.3Mo. It is yet too big because I have to deal with a huge repository of large files.

I wish to know how can I manage options of conversion for getting a DZI folder weighting less or equals to the weight of original files.

Best regards.


Solution

  • You might be able to change the image quality (to make the JPEG files smaller) by playing with the --options command line argument:

    https://github.com/VoidVolker/MagickSlicer#--p---options-imagemagick-options-string-

    You'll have to look at the ImageMagick command line options to find the right value:

    http://imagemagick.org/script/command-line-processing.php#option

    That said, because DZI contains a pyramid of tiles, you are making more pixels than you started with. To be precise, you're ending up with 1.333 times as many pixels. All other things (like image quality settings) being equal, for your 10MB file you should end up with a 13MB set of tiles.