MImgSetTIFCompr

Functions ››
Parent Previous Next

bOk = MImgSetTIFCompr( hImage, nComprMode )

Sets an image's TIFF compression mode.

Parameters
hImage
Number: Handle of the image

nComprMode
Number: The compression mode. Specify one of the following constants:

MIMG_COMPR_TIF_DEFAULT

Default compression. M!Image chooses the compression mode automatically depending on the color depth:
1 Bpp: MIMG_COMPR_TIF_CCITTFAX4
4 Bpp: MIMG_COMPR_TIF_LZW
8 Bpp: MIMG_COMPR_TIF_PACKBITS
24 Bpp: MIMG_COMPR_TIF_JPEG

MIMG_COMPR_TIF_CCITTRLE

CCITTRLE compression. Works only for images with 1 Bpp.

MIMG_COMPR_TIF_CCITTFAX3

CCITTFAX3 ( G3 ) compression. Works only for images with 1 Bpp.

MIMG_COMPR_TIF_CCITTFAX4

CCITTFAX4 ( G4 ) compression. Works only for images with 1 Bpp.

MIMG_COMPR_TIF_NONE

No compression. Works only for images with 1, 4 or 8 Bpp.

MIMG_COMPR_TIF_LZW

LZW compression. Works only for images with 1, 4 or 8 Bpp.

MIMG_COMPR_TIF_PACKBITS

PACKBITS compression. Works only for images with 1, 4 or 8 Bpp.

MIMG_COMPR_TIF_JPEG

JPEG compression. Works only for images with 24 Bpp.

Return
Boolean: TRUE if successful or FALSE if an error occurs

Example

Call MImgSetTIFCompr( hImage, MIMG_COMPR_TIF_JPEG )

Remarks
The TIFF compression doesn't modify the image. It has only an effect when you save the image as TIFF or get the image string with type TIFF.
The default value is MIMG_COMPR_TIF_DEFAULT.

See also
MImgGetTIFCompr
MImgGetString
MImgGetStringBase64
MImgSave
MImgSetGIFCompr
MImgSetJPGQuality

Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator