Placement of images in a DeepZoom Collection generated with the API

386 views Asked by At

I'm generating a DeepZoom collection, using code from Bryant...

http://bryantlikes.com/DeepZoomImageGenerationWithDeepZoomToolsDLL.aspx

This generates a DeepZoom collection with the images arranged in a grid. How do I control the placement of images in the scene using the API?

UPDATE:

I want to be able to place the images next to each other, and generate a DeepZoom image from that... NOT create a collection of SubImages which I have to place at runtime.

This would be akin to the second step in DeepZoom Composer, where you place all the images you imported in step 1 relative to each other, and in step 3 generate the DeepZoom image.

2

There are 2 answers

0
ImageSurf.net On BEST ANSWER

I don't think that deepzoomtools api allows you to create single composition. You will have to use some photo stitching software to stitch the images and then feed it to deepzoomtools to create collection out out that single stitched image.

1
Caleb Jares On

As you can see from his sample code. He adds images by left to right, top to bottom. So all you have to do is sort the list before displaying the images.

var x = 0.0;
var y = 0.0;
foreach (MultiScaleSubImage subImage in msi.SubImages)
{
    subImage.ViewportWidth = 5.333;
    subImage.ViewportOrigin = new Point(-x, -y);
    x += 1;

    if (x >= 5)
    {
        y += 1.333;
        x = 0.0;
    }
}