Scott Hanselman

Viewing a LOT of Images Effectively (plus 700 Obama Newspaper Covers in Silverlight Deep Zoom )

November 08, 2008 Comment on this post [24] Posted in Silverlight
Sponsored By

I don't talk politics as a rule on this blog. However, regardless of your political affiliation, the last week has generated a lot of news. When I saw these 730 Newspaper images from 66 countries at the Newseum, Scott Stanfield and I immediately said Silverlight Deep Zoom!

There's a number of good ways to view LOTS of images at a time. I'll share the ones I use. First, here's our Silverlight DeepZoom Obama News page.

image

Scroll…zoom…

image

Scroll…zoom…

image

Cool. I had to manage these files and check them out before we made the Silverlight DeepZoom version, so I tried these programs:

Windows Explorer

So, the story is, the Newseum assembled 730 newspaper front pages from all over. I downloaded them with DownThemAll and put them in a folder in Explorer. I run 64-bit Windows Vista and didn't have to much trouble with Windows Explorer with only ~700 images. I could use the View Thumbnails feature and zoom in and out and it worked pretty good.

Windows Photo Gallery (the Default Preview)

If you double click on an image in Windows, you'll get the Windows Photo Gallery by default, which just shows the image. You can then navigate around the folder with the left and right keys. It works pretty well, although the previewer fills the screen completely and starts up maximized which I find kind of irritating. Also, there's no way to see previews of the images that are coming up next. The thumbnail view is gone.

Windows Live Photo Gallery

This is a big improvement on the default one. It's a much more polished version of the default one. The most dramatic feature addition is face recognition. If you click on an image, it'll find people:

image

If you click on "people found," the system will highlight the face that you can then identify, and more importantly, search on.

image

Picasa 3 from Google

Picasa 3 is pretty much on par with Windows Live Photo Gallery. They are both fast, they both have some face recognition, although WLPG is much more granular while Picass just has a "show me photos with faces" option.

Where Picas really shines is with its replacement of the default image previewer. If you let it take over as your default image viewer, when you double click on a file you'll get a nice animation, a gray curtain that falls over your desktop, but more importantly a "FilmStrip" of all the files. This little touch lets you much more easily navigate while still previewing files.

Fullscreen capture 1172008 20555 PM

Expression Media 2

A commenter suggested I add Expression Media 2 as the whole point of Expression Media is to catalog butt-loads of media assets. It shouldn't blink at 700 images…and it didn't.

Catalog1 - Microsoft Expression Media 2

It's very bare bones from a Consumer point of view, as it's not meant for organizing the family photos. However, it's power is hidden in its keyboard shortcuts. It's obscenely fast. Truly. Everything moves at the speed of thought, and you can batch rename, tag, change, your photos.

It also notably has a ridiculous number of sorting options, like dozens. You can sort by height, width, author or whatever metadata you like. Definitely something I'd return to if I had several thousands images.

Silverlight DeepZoom

First I tried using DeepZoom Composer, which is a free tool for making DeepZoom collections really easily. We figured we'd drag these 700+ files into DeepZoom and bam! We're done. Well, DeepZoom Composer currently can't handle single collections with THAT many images. This isn't a limitation of DeepZoom, it appears, but the editor which hit 2 gigs of RAM and died. Additionally, with that many files, it's easier to just position the images programmatically. I talked to the PM for the product and they're already on it. However, I can still use the DeepZoom tools programmatically. It's not DeepZoom Composer that does ALL the work, in fact. There's a "SparseImageTool.exe" that we can call programmatically.

Giorgio Sardo has a blog post about this (latest version here), and I was able to use his code directly to make a local DeepZoom collection. Here's a snippet of his code with my changes. It's rough, but it's a one off, so be forgiving:

static void Main(string[] args)
{
// Collection name
string collectionName = "ObamaZoom";
// Folder containing images to be processed
string sourceImagesFolder = @"C:\\Users\\Scott\\Desktop\\Obama\\";
// Destination folder of the batch process
string outputFolder = "D:\\DeepZoomObamaNews\\";

// Eventually create the output directory
if (!Directory.Exists(outputFolder))
Directory.CreateDirectory(outputFolder);

CreateCollection(collectionName, sourceImagesFolder, outputFolder);
}

/// <summary>
/// Create a Test collection using automation
/// </summary>
static void CreateCollection(string collectionName, string sourceImagesFolder, string outputFolder)
{
// Create a collection converter
CollectionConverter collectionConverter = new CollectionConverter();
// Required parameters
collectionConverter.SparseImageToolPath = GetSparseImageToolPath();
collectionConverter.ImagesCollection = GetImages(sourceImagesFolder); // IEnumerable<string> containing the path of the images
collectionConverter.ImagesDestinationFolder = outputFolder;
// Optional parameters
collectionConverter.CollectionName = collectionName;
collectionConverter.CollectionFormat = CollectionConverter.CollectionFormats.XML;

//collectionConverter.ConvertedOverlapPixels = ...
//collectionConverter.ConvertedTileSize = ...
//TODO: You can customize the exporting experience here, by setting the according parameters such as:
// Tile Size, File Format, Collection Format, Compression, Quality, ...

// Attach to completion handler
collectionConverter.BatchCompleted += delegate
{
Console.WriteLine("Conversion completed\nPRESS <ENTER> TO EXIT");
};

try
{
collectionConverter.BatchCollectionExport();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}

Console.WriteLine("Conversion started...");
Console.ReadLine();
}

This code takes the input folder and creates an output folder with the DeepZoom processed files you need. ScottS then said he thought the result would look better if it looks more like the HardRock Cafe Memorabilia site, so we used Vertigo Software's "BigPicture" application (it's internal for now, but he's looking into what to do with it. Contact him if you want more details.) which easily handles all the dynamic positioning of the images in their collections.

The result is pretty cool. Even cooler if you press the Full Screen button (fourth from the left):

image

I think it'd be interesting if this technology wasn't just used as an occasional showcase when an event happens, but as a regular everyday thing. I wonder if it would be hard/cool/interesting/compelling to read a regular newspaper like this? Or of PDF files supported this kind of view? For me, the fun is just the buttery smoothness of the zooming. The frame-rate is crazy fast. Enjoy.

Thank Scott Stanfield and Vertigo Software for hosting it!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
November 08, 2008 2:49
Great information and image. You might want to correct the typo, "I had to manage these files " :)
November 08, 2008 3:57
Great example Scott.
There is clearly a limit to the number of items you can show in one collection, I've notice for the Hard Rock site Vertigo has limit that to 500. In the same way as they did there you could have added a menu to sort or filter the results based on region or type of publication or something.

This would actually be an interesting project for Azure. Imagine a service that took the webpage of links (or more likely a SOAP interface), downloaded the images, made them into tilesets, sent them to your final view location all hosted and processed within the cloud. Depending upon how urgent you needed the page up you could have spun up 100's of instances to do this and completed the job in moments?

John.
November 08, 2008 4:05
Ya, I actually tried REALLY hard to get this into the cloud. First I tried the Live.com Silverlight Streaming but I couldn't get the upload to succeed. I wanted to put it in my Azure account but couldn't figure out how to get the fairly opaque MultiImageControl to understand the URL structure.
November 08, 2008 4:16
Mouse scroolling not working in full screen ? At least I tried twice and I confirm it doesn't
November 08, 2008 4:20
the scrolling (zooming) feature is not working on full screen mood, is this a bug in your code or silverlight? :D
November 08, 2008 4:49
Slight nit - Windows Live Photo Gallery and Picasa 3 Desktop app is doing Face Detection, not face recognition. Face recognition would be after you tag Obama once, twice, etc. it would automatically know that all the other faces are Obama. Face detection is simply finding the face in the picture. It's a very cool feature. But not face recognition.

What's really interesting is that Picasa Web does face recognition.
November 08, 2008 4:49
YES WE CAN!

How can "we" download it..?
5x
November 08, 2008 5:23
The mouse scrollwheel is not supported natively in Silverlight2. In order to get access to it there is a great wrapper that gets the events from the HTML DOM. In fullscreen mode however this isn't possible. I don't understand why and in fact I'm emailing the other Scott now to raise this again. You don't know why do you Scott? Flash supports it, so should silverlight!
I'm guessing this announced-at-PDC Silverlight out of the browser will have the same problem. DeepZoom + mousewheel = awesome :)
The best solution I've seen is popup a full screen window, but really this is pretty lame.
John.
November 08, 2008 5:41
Oops that sounded bad - by other Scott I meant Scott Barnes, Silverlight Guy: http://blogs.msdn.com/msmossyblog/

@Scott: I need to look more into Azure, but it could do the processing and host the application right? The big issue with the hosted services like Silverlight Streaming is the pain to upload the application. The new Silverlight uploader is much more reliable but still not ideal. Another idea - make your Silverlight streaming account part of your Mesh? This would be much nicer then a web based file uploader.

John.
November 08, 2008 5:56
Wish you would have showed Expression Media and how it handled all the images.
November 08, 2008 21:50
Exactly how does one do face detection? I downloaded the latest ( 12.0.1308.1023 ) and I don't see any face detection happening anywhere, nor a way to enabled it. Am I missing something simple?
November 08, 2008 22:23
Scott, can you please give some details on how you used DownThemAll to download all of the large images? I spent about 20 minutes trying but was only able to download all of the smaller thumbnails.
November 09, 2008 2:26
Scott, have you tried ACDSee, especially the Pro version ? http://www.acdsee.com It is lightning fast too and has all the options one would wish for, at least for me ;)
November 09, 2008 5:26
Hi Scott, I bet that zoom works great for you so you can jerk off on the Obama photos. Why don't you keep all of your Obama loving to yourself?
November 09, 2008 8:10
I'm still not convinced that massive collections are best viewed and navigated this way. It's neat as a science project (I'm blown away with what Vertigo has done so far), but I find it a little cumbersome to find what you're looking for on subsequent visits.

What I do think is cool is the potential for looking deep into high resolution images (I've been blogging about that), and I think that's where Deep Zoom's biggest magic is.
November 09, 2008 17:03
Deep Zoom is not the most ideal way to present images, specially once you are inside a massive collection, it is very tough to find relevant info. I am working on similar that will be much more traditional approach to viewing photos at the same time using Deep Zoom.
November 09, 2008 21:25
There are even few Czech newspapers! :-) Great job, Scott, it looks wonderful.
November 10, 2008 4:01
Good work. But I'm not sure about the accuracy of the newspaper search.

Eg. take a look at "The Journal" (bottom row, 3 from the left) and tell me what is there about Obama on that page?

hehe
November 10, 2008 11:57
In a comment above I asked Scot how he used DownThemAll to download all of the large images. I didn't get an answer (I understand, Scott is a busy guy) but I figured it out on my own. I used the page on newseum.org to download the small images. I then used a command line window to create a text file with all of the image names and using a good text editor I created myself an HTML page with links to the large images.

I then used the images to create a slideshow - check it out at:

http://yeswecan.ehuna.org

I also blogged about it here:

http://blog.ehuna.org/2008/11/slideshow_596_newspaper_front.html
(low-res YouTube version of the slideshow included in the blog article)

Good times!
November 10, 2008 23:59
Would love to read a newspaper like this. Otherwise I don't read newspapers. I hate folding them..what a pain in the royal ass.
November 12, 2008 1:47
Yes, we can... barf!
November 13, 2008 0:36
Scott, as I wrote in my mail, this is a great example of showing off Deep Zoom! We are working on a tool called Zoomery that can automate Deep Zoom creation. Please check out what we have been able to do with the same set of images. And feel free to moderate this comment if you think it is too much of a horn-touting... :)
November 13, 2008 19:18
This is awesome. the Modern microfiche!
November 14, 2008 22:18
Loved the Deep Zoom article. I was inspired in a similar way and created this: www.obamanewsmosaic.com

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.