DIPlib Documentation - ©1995-2005 Pattern Recognition Group, Delft University of Technology.

ImageWriteTIFF

Write TIFF image to file (in dipIO)

SYNOPSIS

#include "dipio_tiff.h"

dip_Error ImageWriteTIFF ( image, filename, photometric, compression )

FUNCTION

This function writes the image to a TIFF file, overwriting any other file with the same name. photometric can set to let the function know how to write the TIFF image (supported colour spaces are RGB, CIE Lab and CMYK). If photometric is not DIPIO_PHM_GRAYVALUE, a 3D image is expected, in which the different planes are stored along the 3rd dimension.

ARGUMENTS

Data typeNameDescription
dip_ImageimageOutput image
dip_StringfilenameFile name
dipio_PhotometricInterpretationphotometricPhotometric interpretation
dipio_TIFFCompressioncompressionCompression method

The enumerator dipio_PhotometricInterpretation contains the following constants:

NameDescription
DIPIO_PHM_GREYVALUENo colour information present; it's a grey-value image.
DIPIO_PHM_RGBRGB image (the first three planes are red, green and blue)
DIPIO_PHM_RGB_NONLINEARNon-linear R'G'B' image (RGB channels to the power of 0.4)
DIPIO_PHM_CMYCMY image (the first three planes are cyan, magenta and yellow)
DIPIO_PHM_CMYKCMYK image (the first four planes are cyan, magenta, yellow and black)
DIPIO_PHM_CIELUVCIE L*u'v' image (the first three planes are luminosity, u* and v*)
DIPIO_PHM_CIELABCIE L*a*b* image (the first three planes are luminosity, a* and b*)
DIPIO_PHM_CIEXYZCIE XYZ (the first three planes are X, Y and Z)
DIPIO_PHM_CIEYXYCIE Yxy (the first three planes are Y, x and y)
DIPIO_PHM_HCVHCV image (the first three planes are hue, chroma and value)
DIPIO_PHM_HSVHSV image (the first three planes are hue, saturation and value)
DIPIO_PHM_DEFAULTSame as DIPIO_PHM_GREYVALUE
DIPIO_PHM_GENERICAnything can be coded in the channels; the same as DIPIO_PHM_CMYK

Most file formats support only some of these. dipio_TIFFCompression defines the following compression methods types:

NameDescription
DIPIO_CMP_TIFF_DEFAULTDefault interpretation
DIPIO_CMP_TIFF_NONENone
DIPIO_CMP_TIFF_LZWLZW
DIPIO_CMP_TIFF_PACKBITSPackBits
DIPIO_CMP_TIFF_THUNDERSCANThunderScan
DIPIO_CMP_TIFF_NEXTNeXT
DIPIO_CMP_TIFF_CCITTRLECCITT RLE
DIPIO_CMP_TIFF_CCITTRLEWCCITT RLE/W
DIPIO_CMP_TIFF_CCITTFAX3CCITT Group 3
DIPIO_CMP_TIFF_CCITTFAX4CCITT Group 4
DIPIO_CMP_TIFF_DEFLATEDeflate (ZIP)
DIPIO_CMP_TIFF_ADOBE_DEFLATEAdobeDeflate (ZIP)

The default compression method can be set through dipio_CompressionSetTIFF.

SOFTWARE

This function uses libtiff (version 3.6.1 or later), which supports the TIFF specification revision 6.0. Copyright (c)1988-1997 Sam Leffler and Copyright (c)1991-1997 Silicon Graphics, Inc.

This function uses zlib (version 1.1.4 or later). Copyright (c)1995-2002 Jean-loup Gailly and Mark Adler

KNOWN BUGS

LZW compression is disabled. If you specify LZW, no compression is done.

SEE ALSO

ImageWrite, ImageWriteColour, ImageReadTIFF, ImageIsTIFF

DIPlib on-line documentation | Function reference | Global function index