Monthly Archives: March 2010

evidence nova running on Windows Phone 7 Series

Panoramic applications are a part of the core Windows Phone 7 CTP experience. We already have a large web application built with Silverlight 3. The fact that Windows Phone 7 supports Silverlight as its application platform gave me the inspiration to think about a version which is running on the Windows Phone 7 as a panoramic applications. I created a small demo application to demonstrate how our platform “evidence nova” could look like when running on the Windows Phone 7.

Click here to run the showcase application (after the application is started, click into the content to navigate through the application).

NovaOnMobile7

Advertisements
Tagged , ,

MCTS Exam .NET Framework Application Development

Today I have passed my second Microsoft Certification Exam 70-536 "Microsoft .NET Application Development" successfully. After working about 6 year with the .NET technology it was quite an easy tasks to pass this exam.

image

Tagged

Deep Zoom Collection Downloader

Just for fun I’ve implemented a Deep Zoom Tiles Downloader which recreates the original image from a deep zoom composition. Additionally the downloader can download the original composition from the website to your local disk. The downloader follows the principals of a pure MVVM application.

No, i have not too much time. I’m pretty well experienced with the MVVM pattern in Silverlight but not in the WPF runtime. To get more familiar with MVVM in WPF and to see the difference in a practical manner I decided to put the implementation into a ViewModel and to build a WPF-View on top of them.

The Application

In the Image Rebuilder tab, the application allows to set the deep zoom image settings or discover them automatically from a standard Deep Zoom Composer xml-file.

image

The downloader allows you to set each deep zoom composition parameter manually, because there are deep zoom compositions out there in the internet without having the standard Deep Zoom Composer XML format.

One nice example of such a collection is the “Matterhorn Deep Zoom Collection” created by Ronnie Saurenmann (Microsoft Switzerland).

image

Enter the following values to test the downloader with his collection:

 

In the Tiles Downloader tab, the application allows to set the root folder of the deep zoom composition (containing the folder levels 0, 1, 2, 3, 4, 5, etc), specifying the download target folder and to start the download.

image

 

ViewModel implementation

I’m using the Bitmap from the GDI to rebuild the image. A 32 bit RGB formatted bitmap uses 32 bit i.e. 4 bytes to store data for each pixel. So if you try to rebuild a large deep zoom composition with as example of 50000×50000 pixels then the memory the downloader needs to allocate dynamically for the image is very large 50000*50000*4 bytes which is roughly about 9 GB in memory. While this is not possible with GDI the downloader downloads the image in smaller portion so you might get an image portioned as following (example show image in 5 portions):

image

It should be very easy to build the final image with Photoshop or ImageMagick from the portioned tiles. Feel free to extend the downloader with a better approach while using a 3rd party image lib.

A note about the performance: the downloader rebuilds or downloads images tile-by-tile. I did not have enough time to do it parallel in several threads.

Summary

It’s quite the same to implement a ViewModel in WPF and Silverlight for such very small applications. The only difference I can see so far is the missing constraint for asynchron web request in WPF. This makes the implementation a little bit simpler. The binding expressions are identically to Silverlight, because I don’t need any special here. The command binding was easier to write because the Command property is supported from the ButtonBase natively (Silverlight will provide the same in version 4).

I know, this is a quite simple application and things get complicated when the application gets more complex.

Feedbacks are welcome.

Source code

You can download the source code here:

http://files.thekieners.com/blogcontent/2010/DeepZoomDownloader/source.zip

One final note

This downloader was implemented just for fun. Please consider copyrights when downloading deep zoom images.

Tagged , , ,