tesseract-doxygen/image/imgtiff.cpp File Reference

#include "mfcpch.h"
#include <unistd.h>
#include "fileerr.h"
#include "imgerrs.h"
#include "img.h"
#include "bitstrm.h"
#include "tprintf.h"
#include "serialis.h"
#include "imgtiff.h"

Classes

struct  TIFFENTRY
struct  myrational

Defines

#define INTEL   0x4949
#define MOTO   0x4d4d
#define ENTRIES   19
#define START   8
#define EOL_CODE   0x800
#define EOL_MASK   0xfff
#define EOL_LENGTH   12
#define SHORT_CODE_SIZE   64
#define LONG_CODE_SIZE   40

Typedefs

typedef struct myrational MYRATIONAL

Functions

inT8 open_tif_image (int fd, inT32 *xsize, inT32 *ysize, inT8 *bpp, inT8 *photo, inT32 *res)
inT8 read_tif_image (int fd, uinT8 *pixels, inT32 xsize, inT32 ysize, inT8 bpp, inT32)
inT32 read_eol (R_BITSTREAM *bits, uinT16 &code)
inT8 write_moto_tif (int fd, uinT8 *pixels, inT32 xsize, inT32 ysize, inT8 bpp, inT8 photo, inT32 res)
inT8 write_intel_tif (int fd, uinT8 *pixels, inT32 xsize, inT32 ysize, inT8 bpp, inT8 photo, inT32 res)
inT8 write_inverse_tif (int fd, uinT8 *pixels, inT32 xsize, inT32 ysize, inT8 bpp, inT8 photo, inT32 res)
inT8 write_tif_image (int fd, uinT8 *pixels, inT32 xsize, inT32 ysize, inT8 bpp, inT32 res, inT16 type, inT16 photo)

Variables

const uinT16 short_white_codes [SHORT_CODE_SIZE]
const uinT8 short_white_lengths [SHORT_CODE_SIZE]
const uinT16 short_black_codes [SHORT_CODE_SIZE]
const uinT8 short_black_lengths [SHORT_CODE_SIZE]
const uinT16 long_white_codes [LONG_CODE_SIZE]
const uinT8 long_white_lengths [LONG_CODE_SIZE]
const uinT16 long_black_codes [LONG_CODE_SIZE]
const uinT8 long_black_lengths [LONG_CODE_SIZE]

Define Documentation

#define ENTRIES   19
#define EOL_CODE   0x800
#define EOL_LENGTH   12
#define EOL_MASK   0xfff
#define INTEL   0x4949
#define LONG_CODE_SIZE   40
#define MOTO   0x4d4d
#define SHORT_CODE_SIZE   64
#define START   8

Typedef Documentation

typedef struct myrational MYRATIONAL

Function Documentation

inT8 open_tif_image ( int  fd,
inT32 xsize,
inT32 ysize,
inT8 bpp,
inT8 photo,
inT32 res 
)
inT32 read_eol ( R_BITSTREAM bits,
uinT16 code 
)
inT8 read_tif_image ( int  fd,
uinT8 pixels,
inT32  xsize,
inT32  ysize,
inT8  bpp,
inT32   
)
inT8 write_intel_tif ( int  fd,
uinT8 pixels,
inT32  xsize,
inT32  ysize,
inT8  bpp,
inT8  photo,
inT32  res 
)
inT8 write_inverse_tif ( int  fd,
uinT8 pixels,
inT32  xsize,
inT32  ysize,
inT8  bpp,
inT8  photo,
inT32  res 
)
inT8 write_moto_tif ( int  fd,
uinT8 pixels,
inT32  xsize,
inT32  ysize,
inT8  bpp,
inT8  photo,
inT32  res 
)
inT8 write_tif_image ( int  fd,
uinT8 pixels,
inT32  xsize,
inT32  ysize,
inT8  bpp,
inT32  res,
inT16  type,
inT16  photo 
)

Variable Documentation

const uinT16 long_black_codes[LONG_CODE_SIZE]
Initial value:
 {
  0x3c0, 0x130, 0x930, 0xda0,
  0xcc0, 0x2c0, 0xac0, 0x6c0,
  0x16c0, 0xa40, 0x1a40, 0x640,
  0x1640, 0x9c0, 0x19c0, 0x5c0,
  0x15c0, 0xdc0, 0x1dc0, 0x940,
  0x1940, 0x540, 0x1540, 0xb40,
  0x1b40, 0x4c0, 0x14c0,
  0x80, 0x180, 0x580, 0x480, 0xc80,
  0x280, 0xa80, 0x680, 0xe80, 0x380, 0xb80, 0x780, 0xf80
}
const uinT8 long_black_lengths[LONG_CODE_SIZE]
Initial value:
 {
  10, 12, 12, 12, 12, 12, 12, 13,
  13, 13, 13, 13, 13, 13, 13, 13,
  13, 13, 13, 13, 13, 13, 13, 13,
  13, 13, 13, 11, 11, 11, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12
}
const uinT16 long_white_codes[LONG_CODE_SIZE]
Initial value:
 {
  0x1b, 0x9, 0x3a, 0x76, 0x6c, 0xec, 0x26, 0xa6,
  0x16, 0xe6, 0x66, 0x166, 0x96, 0x196, 0x56, 0x156,
  0xd6, 0x1d6, 0x36, 0x136, 0xb6, 0x1b6, 0x32, 0x132,
  0xb2, 0x6, 0x1b2,
  0x80, 0x180, 0x580, 0x480, 0xc80,
  0x280, 0xa80, 0x680, 0xe80, 0x380, 0xb80, 0x780, 0xf80
}
const uinT8 long_white_lengths[LONG_CODE_SIZE]
Initial value:
 {
  5, 5, 6, 7, 8, 8, 8, 8,
  8, 8, 9, 9, 9, 9, 9, 9,
  9, 9, 9, 9, 9, 9, 9, 9,
  9, 6, 9, 11, 11, 11, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12
}
const uinT16 short_black_codes[SHORT_CODE_SIZE]
Initial value:
 {
  0x3b0, 0x2, 0x3, 0x1, 0x6, 0xc, 0x4, 0x18,
  0x28, 0x8, 0x10, 0x50, 0x70, 0x20, 0xe0, 0x30,
  0x3a0, 0x60, 0x40, 0x730, 0xb0, 0x1b0, 0x760, 0xa0,
  0x740, 0xc0, 0x530, 0xd30,
  0x330, 0xb30, 0x160, 0x960,
  0x560, 0xd60, 0x4b0, 0xcb0,
  0x2b0, 0xab0, 0x6b0, 0xeb0,
  0x360, 0xb60, 0x5b0, 0xdb0,
  0x2a0, 0xaa0, 0x6a0, 0xea0,
  0x260, 0xa60, 0x4a0, 0xca0,
  0x240, 0xec0, 0x1c0, 0xe40,
  0x140, 0x1a0, 0x9a0, 0xd40,
  0x340, 0x5a0, 0x660, 0xe60
}
const uinT8 short_black_lengths[SHORT_CODE_SIZE]
Initial value:
 {
  10, 3, 2, 2, 3, 4, 4, 5,
  6, 6, 7, 7, 7, 8, 8, 9,
  10, 10, 10, 11, 11, 11, 11, 11,
  11, 11, 12, 12, 12, 12, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12,
  12, 12, 12, 12, 12, 12, 12, 12
}
const uinT16 short_white_codes[SHORT_CODE_SIZE]
Initial value:
 {
  0xac, 0x38, 0xe, 0x1, 0xd, 0x3, 0x7, 0xf,
  0x19, 0x5, 0x1c, 0x2, 0x4, 0x30, 0xb, 0x2b,
  0x15, 0x35, 0x72, 0x18, 0x8, 0x74, 0x60, 0x10,
  0xa, 0x6a, 0x64, 0x12, 0xc, 0x40, 0xc0, 0x58,
  0xd8, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x14,
  0x94, 0x54, 0xd4, 0x34, 0xb4, 0x20, 0xa0, 0x50,
  0xd0, 0x4a, 0xca, 0x2a, 0xaa, 0x24, 0xa4, 0x1a,
  0x9a, 0x5a, 0xda, 0x52, 0xd2, 0x4c, 0xcc, 0x2c
}
const uinT8 short_white_lengths[SHORT_CODE_SIZE]
Initial value:
 {
  8, 6, 4, 4, 4, 4, 4, 4,
  5, 5, 5, 5, 6, 6, 6, 6,
  6, 6, 7, 7, 7, 7, 7, 7,
  7, 7, 7, 7, 7, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8,
  8, 8, 8, 8, 8, 8, 8, 8
}
Generated on Sun Jul 18 17:10:51 2010 for Tesseract by  doxygen 1.6.3