TiffEncoder Class |
An ImageEncoder that will write Tagged Image File Format (TIFF) images to a Stream.
Namespace: Atalasoft.Imaging.Codec
The TiffEncoder type exposes the following members.
Name | Description | |
---|---|---|
TiffEncoder | Initializes a new instance of a TiffEncoder. | |
TiffEncoder(TiffCompression) | Initializes a new instance of a TiffEncoder specifying the compression. | |
TiffEncoder(TiffCompression, Boolean) | Initializes a new instance of a TiffEncoder specifying the compression and if the image should be
appended to the end of an existing file. |
Name | Description | |
---|---|---|
Append | Get or sets a value indicating if the image should be appended to the end of an existing file. | |
Compression | Gets or sets a value indicating the compression algorithm used when encoding to a file. | |
IptcTags | Gets or sets IPTC Metadata that will be saved with the image. | |
JpegQuality | Gets or sets the quality level used when saving the image. | |
PhotoshopResources | Gets or sets Photoshop resources to be saved with the image. | |
SaveRichTiffIptc | Gets or sets a value indicating that IPTC data will be stored in the TIFFTAG_RICHTIFFIPTC Tag rather than
the TIFFTAG_PHOTOSHOP tag. | |
StripSize | Gets or sets the strip size used when saving the image. | |
SupportedPixelFormats | Returns an array of pixel formats supported by this encoder. (Overrides ImageEncoderSupportedPixelFormats.) | |
TiffTags | Gets or sets a collection of TIFF Tags that will be encoded with the image when writing. | |
TileSize | Gets or sets the size of tiles that are saved when WriteTiled is true.
| |
UseLzwPredictor | Gets or sets a value indicating LZW predictor. | |
UseOldJpegCompression | Obsolete. When true, JPEG compression will generate old style JPEG in TIFF compression (compression value 6).
| |
WriteImageColorProfile | Controls how the TiffEncoder writes color profiles. | |
WriteTiled | Gets or sets a value that when true, will cause TIFF images to be encoded tiled. | |
Xmp | Gets or sets XMP data to encode with the image. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsPixelFormatSupported | Returns true if the given PixelFormat can be encoded with the derived encoder. (Inherited from ImageEncoder.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnSetEncoderCompression |
Called when the encoder needs to select a compression.
(Inherited from MultiFramedImageEncoder.) | |
Save(Stream, AtalaImage, ProgressEventHandler) | Encode an AtalaImage as a Tiff image to a stream. (Overrides ImageEncoderSave(Stream, AtalaImage, ProgressEventHandler).) | |
Save(Stream, ImageCollection, ProgressEventHandler) | Saves a collection of images to a multi-page TIFF. (Overrides MultiFramedImageEncoderSave(Stream, ImageCollection, ProgressEventHandler).) | |
Save(Stream, ImageSource, ProgressEventHandler) |
Saves the images to the specified stream.
(Overrides MultiFramedImageEncoderSave(Stream, ImageSource, ProgressEventHandler).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
SetEncoderCompression |
Occurs when the encoder needs to select a compression.
(Inherited from MultiFramedImageEncoder.) |
This ImageEncoder can be passed into the the AtalaImage or Workspace objects when saving to specify a TIFF image.
Metadata can be written with the TIFF image including EXIF, IPTC, XMP, and Photoshop Resources. See the %Atalasoft.Imaging.Metadata% namespace for more information.
If the image being saved contains a ColorProfile, it will be embedded within the file.
If the image being saved is 1-bit, and palette index 0 is black and palette index 1 is white, the image will be saved with the photometric value of MINISBLACK. If other viewers mistakingly view the image reversed, invert the image and palette data prior to saving.
When compressing TIFF images, it's sometimes useful to adjust the StripSize to something other than the default. In particular, Deflate and LZW compression work better with larger chunks of data.
// Load the image you want to append. AtalaImage image = new AtalaImage(@"D:\Test Images\TIFF\1-bit.tif"); // Create the TiffEncoder and tell it to append to an existing file. TiffEncoder tiff = new TiffEncoder(TiffCompression.Group4FaxEncoding, true); // Append the image. image.Save(@"D:\Test Images\TIFF\append.tif", tiff, null); image.Dispose();
' Load the image you want to append. Dim image As AtalaImage = New AtalaImage("D:\Test Images\TIFF\1-bit.tif") ' Create the TiffEncoder and tell it to append to an existing file. Dim tiff As TiffEncoder = New TiffEncoder(TiffCompression.Group4FaxEncoding, True) ' Append the image. image.Save("D:\Test Images\TIFF\append.tif", tiff, Nothing) image.Dispose()