A unique image identifier of the GdPicture image representing the single image, that you want to append as a new page at the end of the destination TIFF file.
The file path of the destination TIFF file, where the specified image will be appended. If this file does not exist, it will be created.
A member of the TiffCompression enumeration. The resulting TIFF compression scheme to be used.

Please note that if you apply the JPEG compression, the quality factor used by default is 90. You can use the overloaded AppendToTiff(Int32,String,TiffCompression,Int32) method to set your preferred value for the JpegQuality parameter.

Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / AppendToTiff Method / AppendToTiff(Int32,String,TiffCompression) Method

AppendToTiff(Int32,String,TiffCompression) Method

In This Topic
Appends an image resource, represented by its unique GdPicture image identifier, to a new or existing single or multipage TIFF file according to what you have specified.

The image is added as a new page after the last page of the specified destination TIFF file. If you want to add more pages from your source file to the destination TIFF file, please use this method for each single page.

Syntax
'Declaration
 
Public Overloads Function AppendToTiff( _
   ByVal ImageID As Integer, _
   ByVal FilePath As String, _
   ByVal Compression As TiffCompression _
) As GdPictureStatus
public GdPictureStatus AppendToTiff( 
   int ImageID,
   string FilePath,
   TiffCompression Compression
)
public function AppendToTiff( 
    ImageID: Integer;
    FilePath: String;
    Compression: TiffCompression
): GdPictureStatus; 
public function AppendToTiff( 
   ImageID : int,
   FilePath : String,
   Compression : TiffCompression
) : GdPictureStatus;
public: GdPictureStatus AppendToTiff( 
   int ImageID,
   string* FilePath,
   TiffCompression Compression
) 
public:
GdPictureStatus AppendToTiff( 
   int ImageID,
   String^ FilePath,
   TiffCompression Compression
) 

Parameters

ImageID
A unique image identifier of the GdPicture image representing the single image, that you want to append as a new page at the end of the destination TIFF file.
FilePath
The file path of the destination TIFF file, where the specified image will be appended. If this file does not exist, it will be created.
Compression
A member of the TiffCompression enumeration. The resulting TIFF compression scheme to be used.

Please note that if you apply the JPEG compression, the quality factor used by default is 90. You can use the overloaded AppendToTiff(Int32,String,TiffCompression,Int32) method to set your preferred value for the JpegQuality parameter.

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.

We strongly recommend always checking this status first.

Remarks
Just to remind you, that the toolkit creates the destination file according to the file path you have specified if this file does not exist yet.

Be aware that if you are applying CCITT3 or CCITT4 compression scheme, the image you want to append can only be 1bpp, otherwise the LZW compression scheme is used.

Example
Appending a jpeg image at the last page of an existing multipage tiff image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg");
    gdpictureImaging.AppendToTiff(imageID, "multipage.tif", TiffCompression.TiffCompressionJPEG);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also