Graphe: A WPF Manuscript Image Viewer

Oct 15, 2007
Technologies
  1. .NET 3.0
  2. Microsoft Expression Blend
  3. Windows Presentation Foundation

This image viewer was created for my personal use for a class I am auditing at Dallas Seminary. I had a little free time at work, so I put this together over a couple days. I find the built-in image viewer in XP to be too slow when moving around zoomed images. The work I was doing for this class required quite a bit of that, thus the birth of this application. Though it is for personal use, anyone is welcome to use it. It can be downloaded with an installer package, or you can download the source.

If you would like to be kept up to date when new versions come out, shoot me an email. You can find that email on my about me page.

For Techies

This is an image viewer for viewing digital manuscript images. This was built referencing the WPF Photo Viewer Demo on MSDN (though it had a serious flaw I had to fix). More on that in a blog post later. It only took a couple days to build that, which is a testament to WPF's capabilities more than mine, though, clearly, I rock :). From a techie perspective, here are the things in this app that you might find to be useful when building a WPF app of your own.

  1. Examples of how to use data templates and styles.
  2. How to build a ListBox that has images for its items instead of just plain text.
  3. How to use the Windows thumbnails in a custom application of your own.
  4. How to create WPF data templates. Ever need to be able to determine the template of a databound item at runtime? If so, herein is an example.
  5. How to create WPF style selectors. Ever need to be able to determine the style of a databound item at runtime? It is not that hard, and you will find an example in the source.
  6. How to use isolated storage to store some basic information for later recall.
  7. You noticed that memory leak in MSDN's Photo Viewer Demo too? You can see here how I fixed it.
  8. And other things...

For Greek Geeks

If you like looking at the images of some of the New Testament manuscripts that CSNTM has up on its website, you may find this images viewer useful. It has a few more features that just the ability to view photos, as you will see below in the screenshots and the features section. If you have suggestions for improvement I would love to hear them, though since I am not making any money off of this, I won't promise to deliver :). You can find out how to contact me on my about me page. I will also provide support for you to get it working as long as it does not tie me up too much, but please feel free to ask me if you need help.

Note that this application is not endorsed by CSNTM or its director, Dan Wallace. Nor was it built with his knowledge. He may think it was a fantastic waste of time. This was built primarily for me and secondary, of course, for anyone else who might find it useful. At the very least I expect Dan to make some comment to me about how this slowness of the XP image viewer is one more indication that Macs are better than PCs. He will, of course, be wrong when he makes said comment :).

Do note that the standard disclaimers apply. You use this by your own choice. If the application destroys your computer, melts your monitor, formats your harddrive, kills your fish, causes a massive alien strike because of this advanced technology, brings bird flu to your home, causes leaps in your knowledge of Greek, disturbs the space-time continuum, makes your computer sentient and it rebels against you, opens a chasm beneath your home to the center of the earth, changes your legal name to Barbara, commits acts of treason, gives you excessive body odor, or in any way causes bodily harm to anyone in your neighborhood, please do not sue me. I do not have enough money to make it worth your while.

System Requirements

The lowest amount of RAM I have run this on is 512 megs. If you have lower RAM and it does not work, you may not be able to use it. Then again, it may work fine. And since it is built with Windows Presentation Foundation, it will only run on Windows XP service pack 2 and Vista. And finally, you will need to have the Microsoft .NET 3.0 Framework installed. You can get it through Windows Update. You can also get it here. If you are running Vista you already have it. If you are running XP, you may. The easiest way to tell is to launch Windows Explorer and see if you have this directory: C:\WINDOWS\Microsoft.NET\Framework\v3.0. If you do, you have the 3.0 Framework installed. If not, you do not. If you do not know how to do that, please contact me.

Directions

A manuscript for viewing can be found on the manuscripts page of the website of the Center for the Study of New Testament Manuscripts. To use the viewer, download some of those images into a directory, start the program, click the folder button on the top left of the app, navigate to that folder, and click "OK". If there are a lot of images it may take a bit to load all the thumbnails. Once they are loaded, you should find the viewer to be snappier than the one built into Windows XP. And it has some special features. More on that now.

Features and Screenshots

The most basic feature is the ability to zoom in and out of the image, and navigate quickly with the scrollbars, fixing the very problem I was having with the built-in Windows XP image viewer. There are buttons for zooming if you want to change your zoom just a little, or a slider, if you want to change it quickly.

Another very handy feature is the thumbnail viewer on the left. This will allow you to browse the images if you need to hunt for what you are looking for. If you double-click on the right edge of the thumbnail viewer, it will collapse to give you more room to view. If you want it back, you can double-click the edge and it should pop right back. Also, the image that you current have in the main viewer will be faded out somewhat so you can see which image that is in the thumbnail viewer.

If you are working sequentially through images, you can use the left/right arrow buttons to page through them instead of using the thumbnail viewer.

There are a few ways of getting the name of the image filename you are dealing with at the moment. At the very bottom the image name will be shown for whatever image is in the main viewer. You can also hover over an image in the thumbnail viewer and a tooltip will appear telling you the filename of that image.

One useful navigational feature is the ability to create and index for a group of images. If you stick a file called Index.xml in the directory of the images being viewed, and assuming the file is in the proper format and the data is correct, you can see where you are in the thumbnail viewer. At this point this file must be created and edited manually, via notepad or any text editor of your choice. You can find an example file to download below. You can also export all of that data for the individual images into a text file for copying into another document. Finally, you can also create larger markers for the thumbnail viewer to mark out sections, books, etc. The index files I am working on currently are for the private images we are studying, so I cannot make a full example available for you at this time.

Note On Usage

If you find a bug, please let me know. I want to know...I need to know...

This was built specifically for the manuscript images mentioned before. I have noticed that if this is used for other jpegs, sometimes the thumbnails do not show up, though if you click on the blank space where it should be, it will still be loaded in the viewer. This is not something I have tried to solve yet, but will probably get around to it soon. For the application's intended use this is not a problem. Thumbnails have shown up for absolutely every manuscript image I have viewed.

Downloads

You can download an installer...(for non-techies)

Installer

...or the source (for techies).

Source

And you can download a sample index. It is only a few pages for one manuscript (Sinaiticus), but hopefully it will give you the idea. If not, let me know.

Sample Index