// Constructors, Finalizer and Dispose //====================================================================== public DeepZoomImageTile(ImageProviderBase image, DeepZoomImageRequest imageRequest, int tilePixelDimension, int overlap, string format) { m_image = image; m_imageRequest = imageRequest; m_level = imageRequest.Level; m_tilePixelDimension = tilePixelDimension; }
public void ServeDeepZoomImage(HttpContext context) { DeepZoomImageRequest request = new DeepZoomImageRequest(context.Request.Url); Collection collection = m_collectionCache.Get(request.CollectionKey); if (null == collection) { context.Response.StatusCode = (int)HttpStatusCode.NotFound; context.Response.StatusDescription = "Pivot image data not found. Cache may have expired."; return; } CollectionItem item = collection.Items[request.ItemId]; ImageProviderBase image = item.ImageProvider; DeepZoomImageTile imageTile = new DeepZoomImageTile(image, request, DziSerializer.DefaultTileSize, DziSerializer.DefaultOverlap, DziSerializer.DefaultFormat); imageTile.Write(context.Response); }