Silverlight 深度缩放纵横比返回错误值

Silverlight 深度缩放纵横比返回错误值,silverlight,zooming,Silverlight,Zooming,当图像为2000x1500 png时,我的MultiScale图像返回的纵横比为1。更奇怪的是,xml元数据在纵横比标记中显示为1.33,但高度和宽度为1 我到底错过了什么 谢谢你的帮助 元数据: <Metadata version="1"> <AspectRatio>1.33333333333333</AspectRatio> <Image> <FileName>C:\Documents and Settings\as

当图像为2000x1500 png时,我的MultiScale图像返回的纵横比为1。更奇怪的是,xml元数据在纵横比标记中显示为1.33,但高度和宽度为1

我到底错过了什么

谢谢你的帮助

元数据:

<Metadata version="1">
  <AspectRatio>1.33333333333333</AspectRatio>
  <Image>
    <FileName>C:\Documents and Settings\asmith\Desktop\Temp\DZComposer\Testing1\Source Images\2000x1500 sample image.png</FileName>
    <x>0</x>
    <y>0</y>
    <Width>1</Width>
    <Height>1</Height>
    <ZOrder>1</ZOrder>
    <Tag />
  </Image>
</Metadata>
<Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="1" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">
  <Items>
    <I Id="0" N="0" Source="dzc_output_images/2000x1500%20sample%20image.xml">
      <Size Width="2000" Height="1500" />
      <Viewport Width="1" X="-0" Y="-0" />
    </I>
  </Items>
</Collection>
<MultiScaleImage 
  x:Name="msi" Grid.Column="1" Grid.Row="1" Width="720" Height="540"
  MouseMove="msi_MouseMove"
  MouseLeftButtonUp="msi_MouseLeftButtonUp">
</MultiScaleImage>
private void msi_MouseMove(object sender, MouseEventArgs e)
{
  txtWidth.Text = msi.Width.ToString();
  txtHeight.Text = msi.Height.ToString();
  txtAspectRatio.Text = msi.AspectRatio.ToString();
  txtWidthDivAR.Text = (msi.Width / msi.AspectRatio).ToString();

  Point pLogical = msi.ElementToLogicalPoint(e.GetPosition(msi));
  txtMsiX.Text = pLogical.X.ToString();
  txtMsiY.Text = pLogical.Y.ToString();
  txtLogicYxW.Text = (pLogical.Y * msi.Width).ToString();
  txtLogicXxW.Text = (pLogical.X * msi.Width).ToString();

  Point pRaw = e.GetPosition(msi);
  txtRawX.Text = pRaw.X.ToString();
  txtRawY.Text = pRaw.Y.ToString();

  txtVPO.Text = msi.ViewportOrigin.ToString();
  txtVPW.Text = msi.ViewportWidth.ToString();
}

xml的宽度和高度是原始图像的像素大小,而元数据中的纵横比是多尺度图像作为一个整体的宽度和高度。元数据中图像的宽度和高度与多尺度图像的大小有关