Friday, March 22, 2013

De-Zoomify Image Downloader


For the last three days I've been writing a program to download images that are used in the web service Zoomify. Zoomify splits high resolution images into tiles and only loads them as needed, so it's pain to get the whole high resolution image by downloading the tiles manually.

The program, which I'm calling DeZoomify Downloader is being written in C# using Visual Express and also up on Github: https://github.com/RedRogueXIII/DeZoomify_NET . I've done a smaller .NET application before, but trying to go all out on this one, with preference saving, batch handling, file format options, and a lot of fancy usability options.

At the moment it probably isn't too stable - I know I haven't been sanitizing or checking my inputs, so it's not extensively bug tested. Oh well it's still not close to having all the features I want it to have, but at least it's basic functionality works at the moment. ( Major credit goes to Lovasoa and his simpler web based version : https://gist.github.com/lovasoa/770310  who's work helped served as an understanding of how to get the images in the first place.) So still plenty of time to go back and fix and potential crap outs in can have.

Just today I got batch download working, so there are still two major features I would like to add still: finding all zoomify image links on a given webpage, and multithreading the application so the damn progress bar updates while it's downloading and it doesn't do the "program is not responding, uh oh better kill the app" business while it's busy downloading megabytes of information.

I don't know if it's worth going into detail with any of the mechanics of the program so far, seeing as how the dezoomify process isn't something I came up with, and how almost everything else is handled by the extensive .NET libraries.  Also the entire source code is free to view, download, modify, and run from Github. Perhaps the process of identifying and pulling of the zoomify links from webpages that are displayed to users may be a nice topic for a blog post. That or a horror story of me trying to learn multithreading with 50 tabs open of different "First Must Read Articles About Multithreading".

Geez, so much headache just to make an updating progress bar.

I was entertaining the idea of a separate blog just for non game development stuff, but eh I wouldn't post frequently in either one so all it goes in one blog.

5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Thanks for bringing it to my attention, it's not a wrong link, but a change in how they store global image properties, so modification of the program is required.

      For converting the big stitched together image back into the small tiles, it is possible to add an option that does not stitch the tiles together leaving them in pieces. In the meantime you could use a "sprite sheet splitter" program to evenly split the large image into chunks again.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. at first, thats a great tool!
    is there a way (for me as non programmer) to change the compression level of the saved jpeg files? the original tile files are saved with 0, 10 or 20% compression, but the tool always saves jpeg with 25%
    is it possible to readout the jpeg information, that also contains the compression level?
    a copy paste sample of one downloded tile:
    CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 80

    ReplyDelete