Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

SparseImageTool command line........ RSS

2 replies

Last post Jun 03, 2008 08:37 AM by giorgiosardo

(0)
  • vicraze

    vicraze

    Member

    73 Points

    122 Posts

    SparseImageTool command line........

    Apr 28, 2008 10:08 AM | LINK

    Iam having more than 500images in my folder and i want to implement Deepzoom for these images.....Its very difficult to use DeepZoomComposer to compose these 500images....So i came to know about SparseImageTool.exe command line......

    SparseImageTool.exe <command> <Scenegraph_File_Name> [SdcOutputFile]

    but i dont know how to use this command line....

    can any one pls  give me the examples for this commandline................and can explain how it works?????????????????????????

  • Yi-Lun Luo - MSFT

    Yi-Lun Luo -...

    All-Star

    25149 Points

    2759 Posts

    Microsoft

    Re: SparseImageTool command line........

    Apr 30, 2008 07:25 AM | LINK

    Hello, you need to prepare an xml file to describe the layout of your images. This file looks like this:

    <?xml version="1.0"?>
    <SceneGraph version="1">
    <AspectRatio>1</AspectRatio>
    <SceneNode>
    <FileName>E:\Documents\Expression\Seadragon Projects\UntitledProject1\source images\Blue hills.jpg</FileName>
    <x>0.334775712586399</x>
    <y>0.0032370429667384</y>
    <Width>0.334448160535116</Width>
    <Height>0.253208964496683</Height>
    <ZOrder>1</ZOrder>
    </SceneNode>
    <SceneNode>
    <FileName>E:\Documents\Expression\Seadragon Projects\UntitledProject1\source images\Light_House.bmp</FileName>
    <x>0.000390985719065512</x>
    <y>0.00140448528768737</y>
    <Width>0.334448160535117</Width>
    <Height>0.253208964496683</Height>
    <ZOrder>2</ZOrder>
    </SceneNode>
    </SceneGraph>

    It's fairly simple. You have a series of SceneNode tags. Each SceneNode consists of a FileName tag which stores the full path for that image, x/y tag which stores the position of that image in relative coordinates, Width/Height tag in relative coordinates, and ZOrder which is similar to ZIndex. You can use LINQ to XML to generate such a file easily.

    After you got the xml file, you can run SparseImageTool.exe with the command CreateDeepZoomImage (if you don't need collection), or CreateCollection (if you need collection), and specify the source xml file and the output sdi file. Something like this:

    C:\Program Files\Microsoft\Deep Zoom Composer>SparseImageTool.exe CreateDeepZoomImage"E:\Documents\Expression\Seadragon Projects\New Folder\test source.xml" "E:\Documents\Expression\Seadragon Projects\New Folder\test result.sdi"

    The generated bin file and the images will be included in a folder along side the sdi file.

    shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.
  • giorgiosardo

    giorgiosardo

    Member

    4 Points

    2 Posts

    Microsoft

    Re: SparseImageTool command line........

    Jun 03, 2008 08:37 AM | LINK

    Hi, have a look at my blog: http://blogs.msdn.com/giorgio/

     I've already published a library to obtain that goal...and I'm going to publish a new one really soon [:)]