深度变焦图像构建
我正在尝试构建一个 .dzi,在这种情况下是一个非常宽但不高的图像。
我创建了以下内容 test1.xml,其中包含
<?xml version="1.0" encoding="utf-8"?>
<Image TileSize="1024" Overlap="0" Format="png" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">
<Size Width="2048" Height="1024" />
</Image>
一个名为 test1_files/1/ 的目录,其中有两个 1024 x 1024 .png,其中标记为 0_0.png 和 1_0.png
这会在我的 silverlight 应用程序中打开,没有任何抱怨,但是第一张图片被拉伸到 2048x1024 区域,第二个图像根本不显示,即。它只显示宽高比为 2: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">
<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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
test1_files/1/ 文件夹中的文件的最大总宽度或高度应为 2 像素。
因此,在您的情况下,您应该将 0_0.png 和 1_0.png 文件放置在名为“test1_files/11”的文件夹中,该文件夹的总宽度应为 2048。
如果您确实想构建一组适当的深度缩放兼容的文件。您需要将两个图像缩小到 512x512,并将两个图像合并为一个 1024x512 0_0.png 文件,并将其放置在 /10/ 文件夹中。然后将其缩小到 512x256 并将其放置在 /9/ 文件夹中,依此类推,直到到达 /0/(文件大小为 1x1)。
您可能不必费心处理所有文件夹而只需进行选择,MultiScaleImage 控件在没有它们的情况下也可以正常工作,但如果您这样做,可能会花费 404 次往返。
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.