Module flags

Various FreeImage flags.

The flags are shown here as tables, for documentation purposes, but in practice the Corona binding only accepts strings, namely the various field names.

These are passed to various save and load APIs. Given a file of a certain format, fields from the corresponding save or load table can be passed to the call. Single flags can be passed directly, e.g. as "FLOAT", whereas multiple flags are passed through arrays, e.g. as { "B44", "LC" }.

All formats support a "DEFAULT" flag, which as expected leaves the default behavior intact (though additional flags will override it); an absent flags parameter has the same result. Unknown flags (either to the format in question or generally) are ignored.

A special "LOAD_NOPIXELS" flag is available for certain formats. Using this flag is a request that only the image header is loaded. When not supported, full loading occurs.

Tables

BMP_save BMP save flags.
EXR_save EXR save flags.
GIF_load GIF load flags.
ICO_load ICO load flags.
JPEG_load JPEG load flags.
JPEG_save JPEG save flags.
JXR_save JXR save flags.
PCD_load PCD load flags.
PNG_load PNG load flags.
PNG_save PNG save flags.
PNM_save PNM save flags.
PSD_load PSD load flags.
PSD_save PSD save flags.
RAW_load RAW load flags.
RAW_save RAW save flags.
TARGA_load TARGA load flags.
TARGA_save TARGA save flags.
TIFF_load TIFF load flags.
TIFF_save TIFF save flags.
WEBP_save WEBP save flags.


Tables

BMP_save
BMP save flags.

Fields:

  • RLE Run-length encoding.
EXR_save
EXR save flags.

Fields:

  • FLOAT Save data as float instead of as half (not recommended).
  • NONE Save with no compression.
  • ZIP Save with zlib compression, in blocks of 16 scan lines.
  • PIZ Save with piz-based wavelet compression.
  • PXR24 Save with lossy 24-bit float compression.
  • B44 Save with lossy 44% float compression - goes to 22% when combined with LC.
  • LC Save images with one luminance and two chroma channels, rather than as RGB (lossy compression).
GIF_load
GIF load flags.

Fields:

  • LOAD256 Load the image as a 256 color image with unused palette entries, if it's 16 or 2 color.
  • PLAYBACK 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading.
ICO_load
ICO load flags.

Fields:

  • MAKEALPHA Convert to 32bpp and create an alpha channel from the AND-mask when loading.
JPEG_load
JPEG load flags.

Fields:

  • FAST Load the file as fast as possible, sacrificing some quality.
  • ACCURATE Load the file with the best quality, sacrificing some speed.
  • CMYK Load separated CMYK "as is" (may combine with other load flags).
  • EXIFROTATE Load and rotate according to Exif 'Orientation' tag if available.
  • GREYSCALE Load and convert to a 8-bit greyscale image.
JPEG_save
JPEG save flags.

Fields:

  • QUALITYSUPERB Save with superb quality (100:1).
  • QUALITYGOOD Save with good quality (75:1).
  • QUALITYNORMAL Save with normal quality (50:1).
  • QUALITYAVERAGE Save with average quality (25:1).
  • QUALITYBAD Save with bad quality (10:1).
  • PROGRESSIVE Save as a progressive-JPEG (may combine with other save flags).
  • SUBSAMPLING_411 Save with high 4x1 chroma subsampling (4:1:1) .
  • SUBSAMPLING_420 Save with medium 2x2 medium chroma subsampling (4:2:0) - default value.
  • SUBSAMPLING_422 Save with low 2x1 chroma subsampling (4:2:2).
  • SUBSAMPLING_444 Save with no chroma subsampling (4:4:4).
  • OPTIMIZE On saving, compute optimal Huffman coding tables (can reduce a few percent of file size).
  • BASELINE Save basic JPEG, without metadata or any markers.
JXR_save
JXR save flags.

Fields:

  • LOSSLESS Save lossless.
  • PROGRESSIVE Save as a progressive-JXR (may combine with other save flags).
PCD_load
PCD load flags.

Fields:

  • BASE Load the bitmap sized 768 x 512.
  • BASEDIV4 Load the bitmap sized 384 x 256.
  • BASEDIV16 Load the bitmap sized 192 x 128.
PNG_load
PNG load flags.

Fields:

  • IGNOREGAMMA Loading: avoid gamma correction.
PNG_save
PNG save flags.

Fields:

  • Z_BEST_SPEED Save using ZLib level 1 compression flag (default value is 6).
  • Z_DEFAULT_COMPRESSION Save using ZLib level 6 compression flag (default recommended value).
  • Z_BEST_COMPRESSION Save using ZLib level 9 compression flag (default value is 6).
  • Z_NO_COMPRESSION Save without ZLib compression.
  • INTERLACED Save using Adam7 interlacing (may combine with other save flags).
PNM_save
PNM save flags.

Fields:

  • SAVE_ASCII If set the writer saves in ASCII format (i.e. P1, P2 or P3).
PSD_load
PSD load flags.

Fields:

  • CMYK Reads tags for separated CMYK (default is conversion to RGB).
  • LAB Reads tags for CIELab (default is conversion to RGB).
PSD_save
PSD save flags.

Fields:

  • CMYK As per load.
  • LAB As per load.
RAW_load
RAW load flags.

Fields:

  • PREVIEW Try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit.
  • DISPLAY Load the file as RGB 24-bit.
RAW_save
RAW save flags.

Fields:

  • HALFSIZE Output a half-size color image.
  • UNPROCESSED Output a FIT_UINT16 raw Bayer image.
TARGA_load
TARGA load flags.

Fields:

  • LOAD_RGB888 If set the loader converts RGB555 and ARGB8888 -> RGB888.
TARGA_save
TARGA save flags.

Fields:

  • SAVE_RLE If set, the writer saves with RLE compression.
TIFF_load
TIFF load flags.

Fields:

  • CMYK Reads/stores tags for separated CMYK.
TIFF_save
TIFF save flags.

Fields:

  • CMYK As with load (may combine with compression flags).
  • PACKBITS Save using PACKBITS compression.
  • DEFLATE Save using DEFLATE compression (a.k.a. ZLIB compression).
  • ADOBE_DEFLATE Save using ADOBE DEFLATE compression.
  • NONE Save without any compression.
  • CCITTFAX3 Save using CCITT Group 3 fax encoding.
  • CCITTFAX4 Save using CCITT Group 4 fax encoding.
  • LZW Save using LZW compression.
  • JPEG Save using JPEG compression.
  • LOGLUV Save using LogLuv compression.
WEBP_save
WEBP save flags.

Fields:

  • LOSSLESS Save in lossless mode.
generated by LDoc 1.4.0