/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. #ifndef LEPTONICA_IMAGEIO_H
  16. #define LEPTONICA_IMAGEIO_H
  17. /* ------------------ Image file format types -------------- */
  18. /*
  19. * The IFF_DEFAULT flag is used to write the file out in the
  20. * same (input) file format that the pix was read from. If the pix
  21. * was not read from file, the input format field will be
  22. * IFF_UNKNOWN and the output file format will be chosen to
  23. * be compressed and lossless; namely, IFF_TIFF_G4 for d = 1
  24. * and IFF_PNG for everything else. IFF_JP2 is for jpeg2000, which
  25. * is not supported in leptonica.
  26. */
  27. enum {
  28. IFF_UNKNOWN = 0,
  29. IFF_BMP = 1,
  30. IFF_JFIF_JPEG = 2,
  31. IFF_PNG = 3,
  32. IFF_TIFF = 4,
  33. IFF_TIFF_PACKBITS = 5,
  34. IFF_TIFF_RLE = 6,
  35. IFF_TIFF_G3 = 7,
  36. IFF_TIFF_G4 = 8,
  37. IFF_TIFF_LZW = 9,
  38. IFF_TIFF_ZIP = 10,
  39. IFF_PNM = 11,
  40. IFF_PS = 12,
  41. IFF_GIF = 13,
  42. IFF_JP2 = 14,
  43. IFF_DEFAULT = 15,
  44. IFF_SPIX = 16
  45. };
  46. /* ------------------ Format header ids --------------- */
  47. enum {
  48. BMP_ID = 0x4d42,
  49. TIFF_BIGEND_ID = 0x4d4d, /* MM - for 'motorola' */
  50. TIFF_LITTLEEND_ID = 0x4949 /* II - for 'intel' */
  51. };
  52. /* ------------------ Gray hinting in jpeg reader --------------- */
  53. enum {
  54. L_HINT_GRAY = 1, /* only want grayscale information */
  55. };
  56. #endif /* LEPTONICA_IMAGEIO_H */