none
How to convert DZC to CXML with Database and What do i store for image files with dzc???

    Question

  •  Hello....

    Im coding pivotviewer for album using 3000 images which size is about 3mega each image. If I store just image path in database and load program, it takes time about more 5minute. Thats why I tried to find some solution, and then I found something. But it is coaded as JIT Pivotviewer. If I compile this program with cxml which is made before program loading, it worked. But that coad make cxml dynamically and then send cxml to server side by httphandler. But if i convert DZ Collection dynamically, its very slow when it loaded. I don't know how to make Cxml file using DZ collection file which is made before the program loading and its extention is xml.

    this is web.config file

    <?xml version="1.0"?>

    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->

    <configuration>
      <connectionStrings>
        <add name="ShopMenuConnectionString" connectionString="Data Source=RAPIDSOFT-PC\RAPIDSOFT;Initial Catalog=ShopMenu;Persist Security Info=True;User ID=sa;Password=RapidSoft7765;Pooling=False"
          providerName="System.Data.SqlClient" />
      </connectionStrings>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
        <httpHandlers>
          <add path="*.cxml" verb="GET" type="PingpongCaltalogViewer.Web.CxmlHandler"/>

          <add path="*.dzc" verb="GET"
                type="PingpongCaltalogViewer.Web.DzcHandler"/>
          <add path="*.dzi|*.xml" verb="GET"
                type="PingpongCaltalogViewer.Web.DziHandler"/>
          <add path="*/dzi/*_files/*/*_*.jpg|*/*_files/*/*_*.jpg" verb="GET"
                type="PingpongCaltalogViewer.Web.DeepZoomImageHandler"/>
          <add path="*_files/*/*_*.jpg" verb="GET"
                type="PingpongCaltalogViewer.Web.ImageTileHandler"/>
        </httpHandlers>
      </system.web>
      <system.webServer>
        <handlers>
          <add name="CXML" path="*.cxml" verb="GET"
                type="PingpongCaltalogViewer.Web.CxmlHandler"/>

          <add name="DZC" path="*.dzc" verb="GET"
                type="PingpongCaltalogViewer.Web.DzcHandler"/>
          <add name="DZI" path="*.dzi|*.xml" verb="GET"
                type="PingpongCaltalogViewer.Web.DziHandler"/>
          <add name="DeepZoomImage" path="*/dzi/*_files/*/*_*.jpg|*/*_files/*/*_*.jpg"
                verb="GET" type="PingpongCaltalogViewer.Web.DeepZoomImageHandler"/>
          <add name="ImageTile" path="*_files/*/*_*.jpg"
                verb="GET" type="PingpongCaltalogViewer.Web.ImageTileHandler"/>

        </handlers>
      </system.webServer>
    </configuration>

     

     

    this is cxml file format that is made by code.

    <?xml version="1.0" encoding="utf-8" ?>

    - <Collection xmlns="http://schemas.microsoft.com/collection/metadata/2009" xmlns:ui="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1">
    - <Items ImgBase="demo-aae1fd84680744e89600339685065081.dzc">
      <Item Id="0" Img="#0" Name="1" />
      <Item Id="1" Img="#1" Name="2" />
      </Items>
      </Collection>

     

    this is DZ collection file (collection.xml)

      <?xml version="1.0" encoding="utf-8" ?>
    -        <Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="2" ServerFormat="Default"         xmlns=http://schemas.microsoft.com/deepzoom/2009>
    - <Items>
    - <I Id="0" N="0" Source="IMG_2601.xml">
      <Size Width="1024" Height="768" />
      </I>
    - <I Id="1" N="1" Source="IMG_2602.xml">
      <Size Width="1024" Height="768" />
      </I>
      </Items>
      </Collection>
     
    or I can make dynamic collection file like this(demo-aae1fd84680744e89600339685065081.dzc)
     
      <?xml version="1.0" encoding="utf-8" ?>
    - <Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="2" xmlns="http://schemas.microsoft.com/deepzoom/2008">
    - <Items>
    - <I Id="0" N="0" IsPath="1" Source="http://localhost:49000/dzi/IMG_2601.xml">
      <Size Width="0" Height="0" />
      </I>
    - <I Id="1" N="1" IsPath="1" Source="http://localhost:49000/dzi/IMG_2601.xml">
      <Size Width="0" Height="0" />
      </I>
      </Items>
      </Collection>
     
     

    and this is dzi file (IMG_2601.xml)
     
    <?xml version="1.0" encoding="utf-8" ?>
    - <Image TileSize="256" Overlap="1" Format="jpg" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">
      <Size Width="1024" Height="768" />
      </Image>
     
    But it's not working.
     
     
    and Image files are structed as few levels
     
    by thease files, I wanna use cxml dynamically.....
     
    And I don't know what do i store in database for thease function...
    do I have to store image filepath or filepath of IMG_2601.xml??
    Because it was structed few levels for deepzoom fuction....
     
    Please Help me Im waiting your answers. Thank you.
     
    Friday, January 14, 2011 2:10 AM

Answers

All replies