1 /*====================================================================* 2 - Copyright (C) 2001 Leptonica. All rights reserved. 3 - This software is distributed in the hope that it will be 4 - useful, but with NO WARRANTY OF ANY KIND. 5 - No author or distributor accepts responsibility to anyone for the 6 - consequences of using this software, or for whether it serves any 7 - particular purpose or works at all, unless he or she says so in 8 - writing. Everyone is granted permission to copy, modify and 9 - redistribute this source code, for commercial or non-commercial 10 - purposes, with the following restrictions: (1) the origin of this 11 - source code must not be misrepresented; (2) modified versions must 12 - be plainly marked as such; and (3) this notice may not be removed 13 - or altered from any source or modified source distribution. 14 *====================================================================*/ 15 16 #ifndef LEPTONICA_IMAGEIO_H 17 #define LEPTONICA_IMAGEIO_H 18 19 /* ------------------ Image file format types -------------- */ 20 /* 21 * The IFF_DEFAULT flag is used to write the file out in the 22 * same (input) file format that the pix was read from. If the pix 23 * was not read from file, the input format field will be 24 * IFF_UNKNOWN and the output file format will be chosen to 25 * be compressed and lossless; namely, IFF_TIFF_G4 for d = 1 26 * and IFF_PNG for everything else. 27 */ 28 enum { 29 IFF_UNKNOWN = 0, 30 IFF_BMP = 1, 31 IFF_JFIF_JPEG = 2, 32 IFF_PNG = 3, 33 IFF_TIFF = 4, 34 IFF_TIFF_PACKBITS = 5, 35 IFF_TIFF_RLE = 6, 36 IFF_TIFF_G3 = 7, 37 IFF_TIFF_G4 = 8, 38 IFF_TIFF_LZW = 9, 39 IFF_TIFF_ZIP = 10, 40 IFF_PNM = 11, 41 IFF_PS = 12, 42 IFF_GIF = 13, 43 IFF_DEFAULT = 14 44 }; 45 46 47 /* ------------------ Format header ids --------------- */ 48 enum { 49 BMP_ID = 0x4d42, 50 TIFF_BIGEND_ID = 0x4d4d, /* MM - for 'motorola' */ 51 TIFF_LITTLEEND_ID = 0x4949 /* II - for 'intel' */ 52 }; 53 54 /* ------------------ Format header ids --------------- */ 55 enum { 56 L_HINT_GRAY = 1, /* only want grayscale information */ 57 }; 58 59 #endif /* LEPTONICA_IMAGEIO_H */ 60