views:

40

answers:

1

I'm trying to build a .dzi, in the case a very wide, but not tall image.

I have created the following, test1.xml which contains

<?xml version="1.0" encoding="utf-8"?>
<Image TileSize="1024" Overlap="0" Format="png" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009"&gt;
   <Size Width="2048" Height="1024" />
</Image>

I then have a directory called test1_files/1/ with two 1024 x 1024 .pngs inside labelled 0_0.png and 1_0.png

This opens in my silverlight application without complaint, however the first image is stretched over the 2048x1024 area and the second image does not display at all ie. it just displays the first image with a 2:1 aspect ratio. What am I missing?

A: 

Files in the test1_files/1/ folder should have maximum total width or height of 2 pixels.

Hence in your case you should place your 0_0.png and 1_0.png files in folder called "test1_files/11" which should have a total width of 2048.

If you really want to construct a proper deep zoom compatible set of files. You would need to scale both images down to 512x512 and combine the two into a single 1024x512 0_0.png file and place that in the /10/ folder. Then scale that down to 512x256 and place it in the /9/ folder and so-on until you get to /0/ where the file is 1x1.

You can probably not bother with all the folder and just have selection, the MultiScaleImage control works ok without them but it might cost in 404 round trips if you do.

AnthonyWJones
That did it! Thanks.
Jared O'Connell
A related question. The aspect ratio is now correct, but the image is somewhat opaque. This seems also due to the lack of lower resolution images ie. it seems to blend with the background.Is there anyway around this other than creating the images higher up in the pyramid?
Jared O'Connell
@Jared: I'm not sure what "somewhat opaque" means? Is that the same as "somewhat translucent"? Assuming you haven't got some opacity level on the control or an ancestor set to value under 1 and assuming the pngs themselves don't have alpha set to a value that would make them translucent then... it may be related to the manner in which MultiScaleImage fades one resolution level with another however that fade is usually transitory.
AnthonyWJones