Delegate TiffRgbaImage.PutContigDelegate
Delegate for "put" method (the method that is called to pack pixel data in the raster) used when converting contiguously packed samples.
Namespace: BitMiracle.LibTiff.Classic
Assembly: BitMiracle.LibTiff.NET.dll
Syntax
public delegate void PutContigDelegate(TiffRgbaImage img, int[] raster, int rasterOffset, int rasterShift, int x, int y, int width, int height, byte[] buffer, int offset, int bufferShift);
Parameters
Type | Name | Description |
---|---|---|
TiffRgbaImage | img | An instance of the TiffRgbaImage class. |
System.Int32[] | raster | The raster (the buffer to place decoded image data to). |
System.Int32 | rasterOffset | The zero-based byte offset in |
System.Int32 | rasterShift | The value that should be added to
|
System.Int32 | x | The x-coordinate of the first pixel in block of pixels to be decoded. |
System.Int32 | y | The y-coordinate of the first pixel in block of pixels to be decoded. |
System.Int32 | width | The block width. |
System.Int32 | height | The block height. |
System.Byte[] | buffer | The buffer with image data. |
System.Int32 | offset | The zero-based byte offset in |
System.Int32 | bufferShift | The value that should be added to |
Remarks
The image reading and conversion methods invoke "put" methods to copy/image/whatever tiles of raw image data. A default set of methods is provided to convert/copy raw image data to 8-bit packed ABGR format rasters. Applications can supply alternate methods that unpack the data into a different format or, for example, unpack the data and draw the unpacked raster on the display.
To setup custom "put" method for contiguously packed samples please use PutContig property.
The bufferShift
is usually 0. It is greater than 0 if width of strip
being converted is greater than image width or part of the tile being converted is
outside the image (may be true for tiles on the right and bottom edge of the image).
In other words, bufferShift
is used to make up for any padding on
the end of each line of the buffer with image data.
The rasterShift
is 0 if width of tile being converted is equal to
image width and image data should not be flipped vertically. In other circumstances
rasterShift
is used to make up for any padding on the end of each
line of the raster and/or for flipping purposes.