1
votes

I am trying to build an application which serves images to a Deep Zoom MultiScaleImage dynamically. For example, when an image for a particular corner of the large image is requested, that image should be rendered automatically.

Rendering is what I will implement. But my code needs to be called when the MultiScaleImage requests that corner of the image. How do I implement this?

When I search on StackOverflow for this, I get results that explain dynamic generation of deep zoom images using DeepZoomTools. I am not entirely sure, but this is not I want. I want to generate images only when requested individually and not generate all of them on the fly.

EDIT: Let me give you an example that will explain one of the possible solutions to this, which I don't know how to implement.

If the MultiScaleImage requests the image 5/1_0.png, which if you know Deep Zoom will be the first image in the second column of the large image at 5th zoom level (not related to the real zoom value in deep zoom). When the DeepZoom requests this file, I want to generate it looking at the parameters I have, which are "5", "1", and "0".

1
You could use routing (e.g. 4guysfromrolla.com/articles/012710-1.aspx) to direct the request to a Web Generic handler.Andrew Morton
(sorry for my bad english) - I'm not sure if is this you want but the Pivot Viewer JIT sample does something like this. Look here (geekswithblogs.net/tkokke/archive/2010/08/17/…) - the link to the sample on this article is broken, you could get it here:silverlight.net/learn/data-networking/pivot-viewer/… I do not know if the pivot format is the same of deepzoom but it maybe gets you a start point :)Leo
@AndrewMorton That looks exactly like what I want. You might want to make that as an answer so that I can accept it. Also, now that I am able to route a request to a handler, which will be in an ASPX page, I was wondering how I could reply back with an image, instead of HTML content. I believe it would require me to modify the response headers. I haven't looked into this much. EDIT: OK wonderful! I found what I wanted: sitepoint.com/generating-asp-net-images-flySalil

1 Answers

1
votes

@Salil: will do. You could use routing (e.g. http://4guysfromrolla.com/articles/012710-1.aspx) to direct the request to a Web Generic handler. Note that a generic handler is a bit more suitable than an aspx page as it doesn't have to do so much work with a page lifecycle.