00001 /*====================================================================* 00002 - Copyright (C) 2001 Leptonica. All rights reserved. 00003 - This software is distributed in the hope that it will be 00004 - useful, but with NO WARRANTY OF ANY KIND. 00005 - No author or distributor accepts responsibility to anyone for the 00006 - consequences of using this software, or for whether it serves any 00007 - particular purpose or works at all, unless he or she says so in 00008 - writing. Everyone is granted permission to copy, modify and 00009 - redistribute this source code, for commercial or non-commercial 00010 - purposes, with the following restrictions: (1) the origin of this 00011 - source code must not be misrepresented; (2) modified versions must 00012 - be plainly marked as such; and (3) this notice may not be removed 00013 - or altered from any source or modified source distribution. 00014 *====================================================================*/ 00015 00016 #ifndef LEPTONICA_IMAGEIO_H 00017 #define LEPTONICA_IMAGEIO_H 00018 00019 /* ------------------ Image file format types -------------- */ 00020 /* 00021 * The IFF_DEFAULT flag is used to write the file out in the 00022 * same (input) file format that the pix was read from. If the pix 00023 * was not read from file, the input format field will be 00024 * IFF_UNKNOWN and the output file format will be chosen to 00025 * be compressed and lossless; namely, IFF_TIFF_G4 for d = 1 00026 * and IFF_PNG for everything else. 00027 */ 00028 enum { 00029 IFF_UNKNOWN = 0, 00030 IFF_BMP = 1, 00031 IFF_JFIF_JPEG = 2, 00032 IFF_PNG = 3, 00033 IFF_TIFF = 4, 00034 IFF_TIFF_PACKBITS = 5, 00035 IFF_TIFF_RLE = 6, 00036 IFF_TIFF_G3 = 7, 00037 IFF_TIFF_G4 = 8, 00038 IFF_TIFF_LZW = 9, 00039 IFF_TIFF_ZIP = 10, 00040 IFF_PNM = 11, 00041 IFF_PS = 12, 00042 IFF_GIF = 13, 00043 IFF_DEFAULT = 14 00044 }; 00045 00046 00047 /* ------------------ Format header ids --------------- */ 00048 enum { 00049 BMP_ID = 0x4d42, 00050 TIFF_BIGEND_ID = 0x4d4d, /* MM - for 'motorola' */ 00051 TIFF_LITTLEEND_ID = 0x4949 /* II - for 'intel' */ 00052 }; 00053 00054 /* ------------------ Format header ids --------------- */ 00055 enum { 00056 L_HINT_GRAY = 1, /* only want grayscale information */ 00057 }; 00058 00059 #endif /* LEPTONICA_IMAGEIO_H */