![]() |
Leptonica
1.82.0
Image processing and image analysis suite
|
Go to the source code of this file.
Data Structures | |
struct | L_Compressed_Data |
struct | L_Pdf_Data |
Macros | |
#define | L_FORMAT_IS_TIFF(f) |
Typedefs | |
typedef struct L_Compressed_Data | L_COMP_DATA |
typedef struct L_Pdf_Data | L_PDF_DATA |
Enumerations | |
enum | { IFF_UNKNOWN = 0, IFF_BMP = 1, IFF_JFIF_JPEG = 2, IFF_PNG = 3, IFF_TIFF = 4, IFF_TIFF_PACKBITS = 5, IFF_TIFF_RLE = 6, IFF_TIFF_G3 = 7, IFF_TIFF_G4 = 8, IFF_TIFF_LZW = 9, IFF_TIFF_ZIP = 10, IFF_PNM = 11, IFF_PS = 12, IFF_GIF = 13, IFF_JP2 = 14, IFF_WEBP = 15, IFF_LPDF = 16, IFF_TIFF_JPEG = 17, IFF_DEFAULT = 18, IFF_SPIX = 19 } |
enum | { BMP_ID = 0x4d42, TIFF_BIGEND_ID = 0x4d4d, TIFF_LITTLEEND_ID = 0x4949 } |
enum | { L_JPEG_READ_LUMINANCE = 1, L_JPEG_CONTINUE_WITH_BAD_DATA = 2 } |
enum | { L_J2K_CODEC = 1, L_JP2_CODEC = 2 } |
enum | { L_DEFAULT_ENCODE = 0, L_JPEG_ENCODE = 1, L_G4_ENCODE = 2, L_FLATE_ENCODE = 3, L_JP2K_ENCODE = 4 } |
enum | { L_FIRST_IMAGE = 1, L_NEXT_IMAGE = 2, L_LAST_IMAGE = 3 } |
General features of image I/O in leptonica
At present, there are 9 file formats for images that can be read and written: png (requires libpng, libz) jpeg (requires libjpeg) tiff (requires libtiff, libz) gif (requires libgif) webp (requires libwebp) jp2 (requires libopenjp2) bmp (no library required) pnm (no library required) spix (no library required) Additionally, there are two file formats for writing (only) images: PostScript (requires libpng, libz, libjpeg, libtiff) pdf (requires libpng, libz, libjpeg, libtiff)
For all 9 read/write formats, leptonica provides interconversion between pix (with raster data) and formatted image data: Conversion from pix (typically compression): pixWrite(): pix --> file pixWriteStream(): pix --> filestream (aka FILE*) pixWriteMem(): pix --> memory buffer Conversion to pix (typically decompression): pixRead(): file --> pix pixReadStream(): filestream --> pix pixReadMem(): memory buffer --> pix
Conversions for which the image data is not compressed are: * uncompressed tiff (IFF_TIFF) * bmp * pnm * spix (fast serialization that copies the pix raster data)
The image header (metadata) information can be read from either the compressed file or a memory buffer, for all 9 formats.
Definition in file imageio.h.
#define L_FORMAT_IS_TIFF | ( | f | ) |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |