Increasing performance when generating thumbnail-sized images

  • LibraryMark

    LibraryMark - 2013-09-17

    Hello - I am trying to limit the number of file that I am storing for a project I am working on. Currently, I store a thumbnail jpg for each JP2000 that I have. I would like to switch to pulling a thumbnail image from the JP2000, but it seems a tad slow. Are there any 'tweaks' that I can use to speed up the process? I put LYR=1 in the URL, and that seemed to help some. Is there anything else I need to try? Or should I just keep storing thumbnails?

  • Ruven

    Ruven - 2013-09-20

    Yes, LYR=1 will help as it will extract only 1 quality layer. This also, of course, depends a lot on your encoding parameters and what rate you have set for this first layer. The lower the rate, the faster the decoding.

    Another way to improve speed would be to use caching via Memcached. This will efficiently cache any generated thumbnails, but won't be so effective if requests are very sparse.

    You can also try upgrading to the latest github development version, as this contains nice speed improvements, in particular for JPEG2000 images.

    What size are your thumbnails? If you make sure they are exactly the size of one of the resolution levels that exist in the file (ie: factors of 2), generation of the thumbnail will be fast. If this is not possible, you could also set the INTERPOLATION server parameter to 0 for nearest neighbour interpolation. The default is 1 (bilinear) with is slower, but better quality.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks