Method | Description | |
---|---|---|
Create ( |
Creates new instance of the TiffRgbaImage class.
|
|
GetRaster ( int raster, int offset, int width, int height ) : bool |
Reads the underlaying TIFF image and decodes it into RGBA format raster. GetRaster reads image into memory using current "get" (Get) method, storing the result in the user supplied RGBA raster using one of the "put" (PutContig or PutSeparate) methods. The raster is assumed to be an array of width times height 32-bit entries, where width must be less than or equal to the width of the image (height may be any non-zero size). If the raster dimensions are smaller than the image, the image data is cropped to the raster bounds. If the raster height is greater than that of the image, then the image data placement depends on the value of ReqOrientation property. Note that the raster is assumed to be organized such that the pixel at location (x, y) is raster[y * width + x]; with the raster origin specified by the value of ReqOrientation property. Raster pixels are 8-bit packed red, green, blue, alpha samples. The Tiff.GetR, Tiff.GetG, Tiff.GetB, and Tiff.GetA should be used to access individual samples. Images without Associated Alpha matting information have a constant Alpha of 1.0 (255). GetRaster converts non-8-bit images by scaling sample values. Palette, grayscale, bilevel, CMYK, and YCbCr images are converted to RGB transparently. Raster pixels are returned uncorrected by any colorimetry information present in the directory. Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. SamplesPerPixel minus ExtraSamples). Palette image colormaps that appear to be incorrectly written as 8-bit values are automatically scaled to 16-bits. All error messages are directed to the current error handler. |
Method | Description | |
---|---|---|
CMAP ( int x, int i, int &j ) : void |
Palette images with <= 8 bits/sample are handled with a table to avoid lots of shifts and masks. The table is setup so that put*cmaptile (below) can retrieve 8 / bitspersample pixel values simply by indexing into the table with one number.
|
|
GREY ( int x, int i, int &j ) : void |
Greyscale images with less than 8 bits/sample are handled with a table to avoid lots of shifts and masks. The table is setup so that put*bwtile (below) can retrieve 8 / bitspersample pixel values simply by indexing into the table with one number.
|
|
PACK ( int r, int g, int b ) : int | ||
PACK4 ( int r, int g, int b, int a ) : int | ||
PACKW ( short r, short g, short b ) : int | ||
PACKW4 ( short r, short g, short b, short a ) : int | ||
TiffRgbaImage ( ) : System | ||
W2B ( short v ) : int | ||
YCbCrtoRGB ( int &dst, int Y, int Cb, int Cr ) : void |
YCbCr -> RGB conversion and packing routines.
|
|
buildMap ( ) : bool |
Construct any mapping table used by the associated put method.
|
|
checkcmap ( ) : int | ||
cvtcmap ( ) : void | ||
gtStripContig ( |
Get a strip-organized image that has PlanarConfiguration contiguous if SamplesPerPixel > 1 or SamplesPerPixel == 1
|
|
gtStripSeparate ( |
Get a strip-organized image with SamplesPerPixel > 1 PlanarConfiguration separated We assume that all such images are RGB.
|
|
gtTileContig ( |
Get an tile-organized image that has PlanarConfiguration contiguous if SamplesPerPixel > 1 or SamplesPerPixel == 1
|
|
gtTileSeparate ( |
Get an tile-organized image that has SamplesPerPixel > 1 PlanarConfiguration separated We assume that all such images are RGB.
|
|
initCIELabConversion ( ) : PutContigDelegate | ||
initYCbCrConversion ( ) : bool | ||
isCCITTCompression ( ) : bool | ||
makebwmap ( ) : bool | ||
makecmap ( ) : bool | ||
pickContigCase ( ) : bool |
Select the appropriate conversion routine for packed data.
|
|
pickSeparateCase ( ) : bool |
Select the appropriate conversion routine for unpacked data. NB: we assume that unpacked single channel data is directed to the "packed routines.
|
|
put16bitbwtile ( |
16-bit greyscale => colormap/RGB
|
|
put1bitbwtile ( |
1-bit bilevel => colormap/RGB
|
|
put1bitcmaptile ( |
1-bit palette => colormap/RGB
|
|
put2bitbwtile ( |
2-bit greyscale => colormap/RGB
|
|
put2bitcmaptile ( |
2-bit palette => colormap/RGB
|
|
put4bitbwtile ( |
4-bit greyscale => colormap/RGB
|
|
put4bitcmaptile ( |
4-bit palette => colormap/RGB
|
|
put8bitcmaptile ( |
8-bit palette => colormap/RGB
|
|
putRGBAAcontig16bittile ( |
16-bit packed samples => RGBA w/ associated alpha (known to have Map == null)
|
|
putRGBAAcontig8bittile ( |
8-bit packed samples => RGBA w/ associated alpha (known to have Map == null)
|
|
putRGBAAseparate16bittile ( |
16-bit unpacked samples => RGBA w/ associated alpha
|
|
putRGBAAseparate8bittile ( |
8-bit unpacked samples => RGBA w/ associated alpha
|
|
putRGBUAcontig16bittile ( |
16-bit packed samples => RGBA w/ unassociated alpha (known to have Map == null)
|
|
putRGBUAcontig8bittile ( |
8-bit packed samples => RGBA w/ unassociated alpha (known to have Map == null)
|
|
putRGBUAseparate16bittile ( |
16-bit unpacked samples => RGBA w/ unassociated alpha
|
|
putRGBUAseparate8bittile ( |
8-bit unpacked samples => RGBA w/ unassociated alpha
|
|
putRGBcontig16bittile ( |
16-bit packed samples => RGB
|
|
putRGBcontig8bitCMYKMaptile ( |
8-bit packed CMYK samples w/Map => RGB NB: The conversion of CMYK->RGB is *very* crude.
|
|
putRGBcontig8bitCMYKtile ( |
8-bit packed CMYK samples w/o Map => RGB. NB: The conversion of CMYK->RGB is *very* crude.
|
|
putRGBcontig8bittile ( |
8-bit packed samples, no Map => RGB
|
|
putRGBseparate16bittile ( |
16-bit unpacked samples => RGB
|
|
putRGBseparate8bittile ( |
8-bit unpacked samples => RGB
|
|
putcontig8bitCIELab ( |
8-bit packed CIE L*a*b 1976 samples => RGB
|
|
putcontig8bitYCbCr11tile ( |
8-bit packed YCbCr samples w/ no subsampling => RGB
|
|
putcontig8bitYCbCr12tile ( |
8-bit packed YCbCr samples w/ 1,2 subsampling => RGB
|
|
putcontig8bitYCbCr21tile ( |
8-bit packed YCbCr samples w/ 2,1 subsampling => RGB
|
|
putcontig8bitYCbCr22tile ( |
8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
|
|
putcontig8bitYCbCr41tile ( |
8-bit packed YCbCr samples w/ 4,1 subsampling => RGB
|
|
putcontig8bitYCbCr42tile ( |
8-bit packed YCbCr samples w/ 4,2 subsampling => RGB
|
|
putcontig8bitYCbCr44tile ( |
8-bit packed YCbCr samples w/ 4,4 subsampling => RGB
|
|
putgreytile ( |
8-bit greyscale => colormap/RGB
|
|
putseparate8bitYCbCr11tile ( |
8-bit packed YCbCr samples w/ no subsampling => RGB
|
|
setorientation ( ) : int | ||
setupMap ( ) : bool |
Construct a mapping table to convert from the range of the data samples to [0, 255] - for display. This process also handles inverting B&W images when needed.
|
public static Create ( |
||
tif |
/// The instance of the |
|
stopOnError | bool |
/// if set to |
errorMsg | string | The error message (if any) gets placed here. |
return |
public GetRaster ( int raster, int offset, int width, int height ) : bool | ||
raster | int | The raster (the buffer to place decoded image data to). |
offset | int | The zero-based byte offset in |
width | int | The raster width. |
height | int | The raster height. |
return | bool |