module FreeImage::AbstractSource::Encoder

  1. lib/free-image/sources/abstract_source.rb

The Encoder module defines various constants that control how various image formats are saved.

Constants

BMP_DEFAULT = 0x0  
BMP_SAVE_RLE = 0x1  
EXR_B44 = 0x0020  

Save with lossy 44% float compression - goes to 22% when combined with EXR_LC

EXR_DEFAULT = 0x0  

Save data as half with piz-based wavelet compression

EXR_FLOAT = 0x0001  

Save data as float instead of as half (not recommended)

EXR_LC = 0x0040  

Save images with one luminance and two chroma channels, rather than as RGB (lossy compression)

EXR_NONE = 0x0002  

Save with no compression

EXR_PIZ = 0x0008  

Save with piz-based wavelet compression

EXR_PXR24 = 0x0010  

Save with lossy 24-bit float compression

EXR_ZIP = 0x0004  

Save with zlib compression, in blocks of 16 scan lines

J2K_DEFAULT = 0x0  

Save with a 16:1 rate

JP2_DEFAULT = 0x0  

Save with a 16:1 rate

JPEG_BASELINE = 0x40000  

Save basic JPEG, without metadata or any markers

JPEG_DEFAULT = 0x0  

Loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)

JPEG_OPTIMIZE = 0x20000  

On saving, compute optimal Huffman coding tables (can reduce a few percent of file size)

JPEG_PROGRESSIVE = 0x2000  

Save as a progressive-JPEG (use | to combine with other save flags)

JPEG_QUALITYAVERAGE = 0x0400  

Save with average quality (25:1)

JPEG_QUALITYBAD = 0x0800  

Save with bad quality (10:1)

JPEG_QUALITYGOOD = 0x0100  

Save with good quality (75:1)

JPEG_QUALITYNORMAL = 0x0200  

Save with normal quality (50:1)

JPEG_QUALITYSUPERB = 0x80  

Save with superb quality (100:1)

JPEG_SUBSAMPLING_411 = 0x1000  

Save with high 4x1 chroma subsampling (4:1:1)

JPEG_SUBSAMPLING_420 = 0x4000  

Save with medium 2x2 medium chroma subsampling (4:2:0) - default value

JPEG_SUBSAMPLING_422 = 0x8000  

Save with low 2x1 chroma subsampling (4:2:2)

JPEG_SUBSAMPLING_444 = 0x10000  

Save with no chroma subsampling (4:4:4)

PNG_DEFAULT = 0x0  
PNG_INTERLACED = 0x0200  

Save using Adam7 interlacing (use | to combine with other save flags)

PNG_Z_BEST_COMPRESSION = 0x0009  

Save using ZLib level 9 compression flag (default value is 6)

PNG_Z_BEST_SPEED = 0x0001  

Save using ZLib level 1 compression flag (default value is 6)

PNG_Z_DEFAULT_COMPRESSION = 0x0006  

Save using ZLib level 6 compression flag (default recommended value)

PNG_Z_NO_COMPRESSION = 0x0100  

Save without ZLib compression

PNM_DEFAULT = 0x0  
PNM_SAVE_ASCII = 0x1  

If set the writer saves in ASCII format (i.e. P1, P2 or P3)

PNM_SAVE_RAW = 0x0  

If set the writer saves in RAW format (i.e. P4, P5 or P6)

TARGA_DEFAULT = 0x0  
TARGA_SAVE_RLE = 0x2  

If set, the writer saves with RLE compression

TIFF_ADOBE_DEFLATE = 0x0400  

Save using ADOBE DEFLATE compression

TIFF_CCITTFAX3 = 0x1000  

Save using CCITT Group 3 fax encoding

TIFF_CCITTFAX4 = 0x2000  

Save using CCITT Group 4 fax encoding

TIFF_CMYK = 0x0001  

Reads/stores tags for separated CMYK (use | to combine with compression flags)

TIFF_DEFAULT = 0x0  
TIFF_DEFLATE = 0x0200  

Save using DEFLATE compression (a.k.a. ZLIB compression)

TIFF_JPEG = 0x8000  

Save using JPEG compression

TIFF_LOGLUV = 0x10000  

Save using LogLuv compression

TIFF_LZW = 0x4000  

Save using LZW compression

TIFF_NONE = 0x0800  

Save without any compression

TIFF_PACKBITS = 0x0100  

Save using PACKBITS compression