This is the main class for the ImageKit Web Thumbnail Control.

For a list of all members of this type, see ImageKit.WPF.Web.Thumbnail Members.

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      System.Web.UI.WebControls.BaseDataList
        System.Web.UI.WebControls.DataList

          Newtone.ImageKit.Web
public class Thumbnail : Object

Explanation

The ImageKit Web Thumbnail Control is a web server control that automatically displays multiple images as thumbnails. Use the ImageDirectory property to set the directory that contains the images you would like to display and then execute the ShowThumbnailImages method. The Thumbnail Control will load these images and automatically create thumbnail images from the images, saving the thumbnail images (JPEG format) in the directory specified by the ThumbnailImageDirectory. The thumbnail images are then displayed in the WebForm.

Virtual Directories: Both directories, the image directory (specified by the ImageDirectory property) and the thumbnail image directory (specified by the ThumbnailImageDirectory property), must exist on the server where the Thumbnail Control application runs. The thumbnail image directory must have write permission. The paths to both directories must be virtual paths but omits the server name. For example:

If the image directory is in the following virtual path: "http://MyServer/SampleImages/1"

then the ImageDirectory property should be set to "/SampleImages/1". (without "http://MyServer" )

Likewise, when the thumbnail image directory is in the following virtual path: "http://localhost/SampleImages/1/ThumbnailImages"

then the ThumbnailImageDirectory property should be set to "/SampleImages/1/ThumbnailImages" (without "http://MyServer")

 

The Thumbnail Control creates thumbnail images on the server as 24 bit color JPEG images. This is true regardless of the original image's bitcount or image format. This is true even if 1 bit color images or vector images are loaded into the Thumbnail Control.

If the directory, specified by the ThumbnailImageDirectory property, does not exist, the Thumbnail Control will create that directory along with the thumbnail images. IMPORTANT: This thumbnail image directory must have write permission.  The thumbnail images will be recreated if the original image directory's datetime stamp is newer than the thumbnail image directory's datetime stamp.

Information about the created thumbnail images is stored in a thumbnail configuration file (an xml file called Config.xml by default). This file is specified by the ConfigFile property. When the information in the ConfigFile changes, the thumbnail images will be recreated.

The thumbnail images will be created with the name of the original image + ".jpg". So if the original image is named "ABC123.jpg", the Thumbnail Control will create a thumbnail for this image called "ABC123.jpg.jpg"

DataList

ShowFileNameText property

By default, the Thumbnail Control displays the original image's filename in the cell under the thumbnail image. By using the ShowFileNameText property, you can set an xml file that allows seperate comments to be displayed under each thumbnail image. For example, if the following xml file, named "FileNameText.xml", exists in the same directory as these images "001.jpg", "abc.tif", "002.jpg", then the following comments will be displayed under the corresponding thumbnail images.

FileNameText.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<FileNameText>
<_001.jpg>Image_1</_001.jpg>
<abc.tif-1>Image_2</abc.tif-1>
<abc.tif-2>Image_3</abc.tif-2>
<_002.jpg>Image_4</_002.jpg>
</FileNameText>

Note: Because xml tags cannot contain a numeral as the first character, an underbar is added at the beginning of the xml tags for images "001.jpg" and "002.jpg". The Thumbnail Control will ignore the initial underbar in any tag within the FileNameText.xml file. Also, image abc.tif is a multipage tiff image. In the xml tag, the second page of this multipage tiff image is designated in as and the third page is designated as (The page index starts with 0).

Although we recommend that you keep the FileNameText.xml file in the same directory as the images that it modifies, it is possible to change the directory of the FileNameText.xml file. To do this, set a virtual path from the FileNameText.xml file to the directory containing the images that it modifies. In other words, setting the ShowFileNameText property to "../../FileNameText.xml" means that the FileNameText.xml file is contained in the virtual directory two directories above the directory containing the images.

HyperLinkURLFile property

By default, clicking a thumbnail image displays the original image file. By using the HyperLinkURLFile property, you can set an xml file that allows seperate hyperlinks to be used when different thumbnail images are clicked. For example, if the following xml file, named "URL.xml", exists in the same directory as these images "001.jpg", "abc.tif", and "002.jpg", then the following hyperlinks will be enabled when the corresponding thumbnail images are clicked.

URL.xml"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<UrlData>
<_001.jpg>http://www.newtone.co.jp/</_001.jpg>
<abc.tif-1>http://msdn.microsoft.com/library/ja/</abc.tif-1>
<abc.tif-2>http://www.yahoo.co.jp/</abc.tif-2>
<_002.jpg>http://www.google.co.jp/</_002.jpg>
</UrlData>

Note: Because xml tags cannot contain a numeral as the first character, an underbar is added at the beginning of the xml tags for images "001.jpg" and "002.jpg". The Thumbnail Control will ignore the initial underbar in any tag within the xml file. Also, the image abc.tif is a multipage tiff image. The xml tag that designates the second page of this multipage tiff image is <abc.tif-1> and the xml tag designating the third page is <abc.tif-2> (The page index starts with 0).

Although we recommend that you keep the xml file in the same directory as the images that it modifies, it is possible to change the directory of the xml file. To do this, set a virtual path from the xml file to the directory containing the images that it modifies. In other words, setting the HyperLinkURLFile property to "../../URL.xml" means that the xml file called "URL.xml" is contained in the directory two directories above the directory containing the images.

Requirements

Namespace : Newtone.ImageKit.Web

Assembly : Newtone.ImageKit.WPF.Web.Thumbnail.dll

See Also

ImageKit.WPF.Web.Thumbnail Members

The ImageKit WPF is created by Newtone Corporation