PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/ocr/ocrservice/jni/hydrogen/include/leptonica/imageio.h

http://eyes-free.googlecode.com/
C++ Header | 64 lines | 30 code | 8 blank | 26 comment | 0 complexity | 25a18bfd4596b0c62b82d1c5d63232db MD5 | raw file
 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.   IFF_JP2 is for jpeg2000, which
27 *  is not supported in leptonica.
28 */
29enum {
30    IFF_UNKNOWN        = 0,
31    IFF_BMP            = 1,
32    IFF_JFIF_JPEG      = 2,
33    IFF_PNG            = 3,
34    IFF_TIFF           = 4,
35    IFF_TIFF_PACKBITS  = 5,
36    IFF_TIFF_RLE       = 6,
37    IFF_TIFF_G3        = 7,
38    IFF_TIFF_G4        = 8,
39    IFF_TIFF_LZW       = 9,
40    IFF_TIFF_ZIP       = 10,
41    IFF_PNM            = 11,
42    IFF_PS             = 12,
43    IFF_GIF            = 13,
44    IFF_JP2            = 14,
45    IFF_DEFAULT        = 15,
46    IFF_SPIX           = 16
47};
48
49
50/* ------------------ Format header ids --------------- */
51enum {
52    BMP_ID             = 0x4d42,
53    TIFF_BIGEND_ID     = 0x4d4d,     /* MM - for 'motorola' */
54    TIFF_LITTLEEND_ID  = 0x4949      /* II - for 'intel' */
55};
56
57/* ------------------ Gray hinting in jpeg reader --------------- */
58enum {
59    L_HINT_GRAY = 1,  /* only want grayscale information */
60};
61
62
63#endif  /* LEPTONICA_IMAGEIO_H */
64