Improving Image Presentation, Blind Leads

Two weeks ago, I mentioned that I had a pretty good start on getting the presentation ready for the emakimono 絵巻物 we’re focusing on first. Last week was significantly more frustrating, spent significantly in chasing a few blind leads.

The proximate trail that led me to OpenLayers has gone cold now, but I know that it’s a popular JavaScript library for map layering on the web. When I saw their examples listing, I was pleased that there was a way to use Zoomify tiles, and it was relatively trivial to ape their model. What sank me was trying to add some static image layers over the Zoomify layer. Ultimately, one possible way of enriching the presentation of this scroll might be to find some way to ghost out or mask out portions of the scroll not corresponding to a facet selected by a reader, but it turned out to be too early to go in that direction, at least with OpenLayers. This is mostly a good thing, as a project that gets ahead of itself risks stepping on itself and never coming to a completion point or pause point.

This week was back to successes, though. Firstly, in working with the IIP approach, it occurred to me that I might have other projects in which it might be useful, but which have needs possibly orthogonal to this project. Reading through and following the links on the IIPImage site led me to some examples from the National Gallery in London, and a quick email with Joseph Padfield there assured me that I can explore his work for our needs. He and they will get all possible credit for the wonderful work they have done in thinking through how large images could be best shared for viewing online. Best of all, one of their examples allows for viewing two (or more) images at once and navigating their position and zoom level independently. I mention this in this context because it’s possible we have other emakimono 絵巻物 in Yale’s collections that we could allow students and scholars to compare in the future. Equally importantly, and what brings me back to the Nihonshi project at hand, Padfield and the National Gallery posted an example of using the annotation capabilities of IIPImage 2.0 beta. Even without using masking layers, I’m pretty sure these annotations will be very useful.

Another success this week was replicating the install of IIPImage on an Ubuntu server virtual machine on my laptop. That was significantly easier than I thought, but I suppose that’s how demonstrating something you genuinely learned can go. Here’s the rough procedure for what I did, which is not significantly different from what IIPImage says to do:

  1. Install Ubuntu 12.04 (Precise Pangolin) 64-bit server as VM
  2. Make sure your package repositories are up to date by running sudo apt-get update
  3. Follow IIPImage instructions for installing in Ubuntu (non-JPEG2000 version). If you are new to this stuff, as we all were once, but still need or want to follow what I did, note that the server has no GUI and therefore no browser. I used wget to get the IIPImage package, and I believe curl would work as well. Installing and using those is the subject of many online tutorials that should arise with a search.
  4. Follow VirtualBox instructions for installing VirtualBox Guest Additions for Ubuntu. I did this so I could access shared folders on my host machine, though I probably could just have used SFTP.
    1. I had to mount the CD-ROM intentionally before the install proper:
      sudo mount /dev/cdrom /mnt
      cd /mnt
      sh ./
    2. Ignore fail message about the Window System drivers since my host was OS X
  5. Rebooted the VM
  6. Navigate on the server to /media/[shared folder] just to make sure everything was there, backed up from the Ubuntu Desktop VM
  7. Copy everything from the IIPImage sample except the AUTHORS and README files to the root web directory of the server
  8. Call up the appropriate URI from a web browser on the host, and Bob’s your uncle

(Also, I chmod’ed everything to 755 anytime I was getting access issues just to make things easier, but the permissions could probably be 644.)

As anyone who has ever tried to install things from the Open Source world, including Linux (even, to some extent, including Ubuntu), things rarely go the way the stepwise walkthroughs say or imply they should. I’ve probably skipped some little detours that I made, and if you get stuck feel free to contact me. The best way these days is probably via Twitter.