This method adds a page to the end of a multipage tiff and saves it to file.

[Visual Basic] Public Function AppendTiffImage(Val As Newtone.ImageKit.SaveFileType, SaveUrl As Image) As Boolean
[C#] public bool AppendTiffImage(Newtone.ImageKit.SaveFileType Val, Image SaveUrl);

Parameters

Val
     The image format of the image to be appended to the multipage Tiff (of type Newtone.ImageKit.SaveFileType)

SaveUrl
     The virtual path to the Tiff image which will have a page appended to it (The virtual path must be within the scope of the web application)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The AppendTiffImage method adds a page to the end of a multipage tiff and saves it to file. The image loaded by the LoadImageFromFile method or by the LoadImageFromRawData method will be added as the last page to the Tiff file set in the SaveUrl parameter. If no image file is set in the SaveUrl parameter then the AppendTiffImage will save the image in the path set in the SaveUrl parameter as a single page Tiff image.

Then AppendTiffImage method is enabled when a Tiff image format is set in the Val parameter. It is possible for different pages in the multipage Tiff file to have different Tiff compression formats. If a file format other than a Tiff format is chosen for the Val parameter, or if the image file set in the SaveUrl parameter is not a Tiff file, then the AppendTiffImage method will fail and return a value of False. The image set in the the LoadImageFromFile method or by the LoadImageFromRawData method need not be a Tiff image but there are issues regarding the bitcount that must be considered. See explanation below.

Regarding tiff compression and image bitcounts:
Depending on the tiff compression choosen, images with certain bitcounts may not be able to be saved. In this case, errors may result. Below is a table listing the tiff compression and the bitcounts that are possible with that compression
 

Format Compatible Bitcount
Tiff (Uncompressed) 1, 4, 8, 16 (16 grayscale not supported), 24, 32.
Tiff (Group 3-1D) 1, 4, 8, 16 (16 grayscale not supported), 24, 32.
Important: On Windows Vista, only 1 bit images are supported. All other bitcounts will fail
Tiff (Group 4) 1, 4, 8, 16 (16 grayscale not supported), 24, 32.
Important: On Windows Vista, only 1 bit images are supported. All other bitcounts will fail
Tiff (Packbits) 1, 24.
Tiff (LZW) 1, 4, 8, 16 (16 grayscale not supported), 24, 32.

Tiff Group3-1D are the same format as MH. Tiff Group4 are the same format as MMR.
In Uncompressed and LZW formats, 16 bit images are converted to 24 bit images.

Examples

The following code will load a 1 bit BMP image, convert it to a Tiff G4 image and append it to the end of a multipage Tiff file

[Visual Basic.NET]
    ImageKit1.Url = "1bitBMP.bmp"
    ImageKit1.LoadImageFromFile(Newtone.ImageKit.LoadFileType.Load)
    ImageKit1.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFGroup4, "001.Tif")

[Visual C#.NET]
    ImageKit1.Url = "1bitBMP.bmp";
    ImageKit1.LoadImageFromFile(Newtone.ImageKit.LoadFileType.Load);
    ImageKit1.AppendTiffImage(Newtone.ImageKit.SaveFileType.SaveTIFFGroup4, "001.Tif");

Also See

ImageKit.WPF.Web.ImageKit Members | Newtone.ImageKit.WPF.Web.ImageKit

The ImageKit WPF is created by Newtone Corporation