我正在尝试使用OpenSeaDragon显示多个图像。我使用Deep zoom Composer创建了图像文件,并生成了以下XML文件(经删节):
dzc_output.xml:
<?xml version="1.0" encoding="utf-8"?>
<Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="5" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">
<Items>
<I Id="0" N="0" Source="dzc_output_images/ft1.xml">
<Size Width="825" Height="584" />
<Viewport Width="5.2402050398801272" X="-0" Y="-0" />
</I>
<I Id="1" N="1" Source="dzc_output_images/ft2.xml">
<Size Width="824" Height="583" />
<Viewport Width="5.2375806686733934" X="-1.0500455705877254" Y="-0" />
</I>
<!--3 more images not shown as not necessary-->
</Items>
</Collection>
我创建了一个非常简单的HTML页面来显示查看器(我打算在最终项目中使用Django)。我使用以下代码创建了查看器:
var viewer = OpenSeadragon({
id: "openseadragon1",prefixUrl: "openseadragon/images/",tileSources: "imagesources/dzc_output.xml",sequenceMode: true
});
我正在使用python -m http.server
来提供html页面所在的文件夹。它对于单个图像效果很好。但是,使用包含多个图像的dzc_output.xml文件,当我加载页面时,查看器将显示“无法打开[object Object]:无法加载TileSource”。滚动图像会产生以下错误:“无法打开[object Object]:HTTP 404尝试加载TileSource”
我不确定这是什么问题。任何帮助都会很好。