| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Macros | Functions | Variables
tif_getimage.c File Reference
`#include "tiffiop.h"`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | FLIP_VERTICALLY 0x01
#define | FLIP_HORIZONTALLY 0x02
#define | REPEAT8(op) REPEAT4(op); REPEAT4(op)
#define | REPEAT4(op) REPEAT2(op); REPEAT2(op)
#define | REPEAT2(op) op; op
#define | CASE8(x, op)
#define | CASE4(x, op) switch (x) { case 3: op; case 2: op; case 1: op; }
#define | NOP
#define | UNROLL8(w, op1, op2)
#define | UNROLL4(w, op1, op2)
#define | UNROLL2(w, op1, op2)
#define | SKEW(r, g, b, skew) { r += skew; g += skew; b += skew; }
#define | SKEW4(r, g, b, a, skew) { r += skew; g += skew; b += skew; a+= skew; }
#define | A1 (((uint32)0xffL)<<24)
#define | PACK(r, g, b) ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1)
#define | PACK4(r, g, b, a) ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24))
#define | W2B(v) (((v)>>8)&0xff)
#define | PACKW(r, g, b) ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1)
#define | PACKW4(r, g, b, a) ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24))
#define | DECLAREContigPutFunc(name)
#define | DECLARESepPutFunc(name)
#define | YCbCrtoRGB(dst, Y)
#define | GREY(x) c = Map[x]; *p++ = PACK(c,c,c);
#define | CVT(x) ((uint16)((x)>>8))
#define | CMAP(x) c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff);

## Functions
int | TIFFRGBAImageOK (TIFF *tif, char emsg[1024])
void | TIFFRGBAImageEnd (TIFFRGBAImage *img)
int | TIFFRGBAImageBegin (TIFFRGBAImage *img, TIFF *tif, int stop, char emsg[1024])
int | TIFFRGBAImageGet (TIFFRGBAImage *img, uint32 *raster, uint32 w, uint32 h)
int | TIFFReadRGBAImageOriented (TIFF *tif, uint32 rwidth, uint32 rheight, uint32 *raster, int orientation, int stop)
int | TIFFReadRGBAImage (TIFF *tif, uint32 rwidth, uint32 rheight, uint32 *raster, int stop)
| DECLAREContigPutFunc (put8bitcmaptile)
| DECLAREContigPutFunc (put4bitcmaptile)
| DECLAREContigPutFunc (put2bitcmaptile)
| DECLAREContigPutFunc (put1bitcmaptile)
| DECLAREContigPutFunc (putgreytile)
| DECLAREContigPutFunc (put16bitbwtile)
| DECLAREContigPutFunc (put1bitbwtile)
| DECLAREContigPutFunc (put2bitbwtile)
| DECLAREContigPutFunc (put4bitbwtile)
| DECLAREContigPutFunc (putRGBcontig8bittile)
| DECLAREContigPutFunc (putRGBAAcontig8bittile)
| DECLAREContigPutFunc (putRGBUAcontig8bittile)
| DECLAREContigPutFunc (putRGBcontig16bittile)
| DECLAREContigPutFunc (putRGBAAcontig16bittile)
| DECLAREContigPutFunc (putRGBUAcontig16bittile)
| DECLAREContigPutFunc (putRGBcontig8bitCMYKtile)
| DECLAREContigPutFunc (putRGBcontig8bitCMYKMaptile)
| DECLARESepPutFunc (putRGBseparate8bittile)
| DECLARESepPutFunc (putRGBAAseparate8bittile)
| DECLARESepPutFunc (putRGBUAseparate8bittile)
| DECLARESepPutFunc (putRGBseparate16bittile)
| DECLARESepPutFunc (putRGBAAseparate16bittile)
| DECLARESepPutFunc (putRGBUAseparate16bittile)
| DECLAREContigPutFunc (putcontig8bitCIELab)
| DECLAREContigPutFunc (putcontig8bitYCbCr44tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr42tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr41tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr22tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr21tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr12tile)
| DECLAREContigPutFunc (putcontig8bitYCbCr11tile)
| DECLARESepPutFunc (putseparate8bitYCbCr11tile)
int | TIFFReadRGBAStrip (TIFF *tif, uint32 row, uint32 *raster)
int | TIFFReadRGBATile (TIFF *tif, uint32 col, uint32 row, uint32 *raster)

## Variables
TIFFDisplay | display_sRGB

## Macro Definition Documentation

#define A1 (((uint32)0xffL)<<24)

Definition at line 1033 of file tif_getimage.c.

#define CASE4 | ( |  | x,
|  |  | op
| ) |  | switch (x) { case 3: op; case 2: op; case 1: op; }

Definition at line 993 of file tif_getimage.c.

#define CASE8 | ( |  | x,
|  |  | op
| ) |  |

Value:
switch (x) { \
case 7: op; case 6: op; case 5: op; \
case 4: op; case 3: op; case 2: op; \
case 1: op; \
}

Definition at line 987 of file tif_getimage.c.

#define CMAP | ( |  | x | ) | c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff);

#define CVT | ( |  | x | ) | ((uint16)((x)>>8))

#define DECLAREContigPutFunc | ( |  | name | ) |

Value:
static void name(\
TIFFRGBAImage* img, \
uint32* cp, \
uint32 x, uint32 y, \
uint32 w, uint32 h, \
int32 fromskew, int32 toskew, \
unsigned char* pp \
)
_TIFFRGBAImage
Definition: tiffio.h:190

Definition at line 1044 of file tif_getimage.c.

#define DECLARESepPutFunc | ( |  | name | ) |

Value:
static void name(\
TIFFRGBAImage* img,\
uint32* cp,\
uint32 x, uint32 y, \
uint32 w, uint32 h,\
int32 fromskew, int32 toskew,\
unsigned char* r, unsigned char* g, unsigned char* b, unsigned char* a\
)
b
long b
Definition: jpegint.h:371
_TIFFRGBAImage
Definition: tiffio.h:190

Definition at line 1398 of file tif_getimage.c.

#define FLIP_HORIZONTALLY 0x02

Definition at line 47 of file tif_getimage.c.

#define FLIP_VERTICALLY 0x01

Definition at line 46 of file tif_getimage.c.

#define GREY | ( |  | x | ) | c = Map[x]; *p++ = PACK(c,c,c);

#define NOP

Definition at line 994 of file tif_getimage.c.

#define PACK | ( |  | r,
|  |  | g,
|  |  | b
| ) |  | ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1)

Definition at line 1034 of file tif_getimage.c.

#define PACK4 | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a
| ) |  | ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24))

Definition at line 1036 of file tif_getimage.c.

#define PACKW | ( |  | r,
|  |  | g,
|  |  | b
| ) |  | ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1)

Definition at line 1039 of file tif_getimage.c.

#define PACKW4 | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a
| ) |  | ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24))

Definition at line 1041 of file tif_getimage.c.

#define REPEAT2 | ( |  | op | ) | op; op

Definition at line 986 of file tif_getimage.c.

#define REPEAT4 | ( |  | op | ) | REPEAT2(op); REPEAT2(op)

Definition at line 985 of file tif_getimage.c.

#define REPEAT8 | ( |  | op | ) | REPEAT4(op); REPEAT4(op)

Definition at line 984 of file tif_getimage.c.

#define SKEW | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | skew
| ) |  | { r += skew; g += skew; b += skew; }

Definition at line 1030 of file tif_getimage.c.

#define SKEW4 | ( |  | r,
|  |  | g,
|  |  | b,
|  |  | a,
|  |  | skew
| ) |  | { r += skew; g += skew; b += skew; a+= skew; }

Definition at line 1031 of file tif_getimage.c.

#define UNROLL2 | ( |  | w,
|  |  | op1,
|  |  | op2
| ) |  |

Value:
{ \
uint32 _x; \
for (_x = w; _x >= 2; _x -= 2) { \
op1; \
REPEAT2(op2); \
} \
if (_x) { \
op1; \
op2; \
} \
}
REPEAT2
#define REPEAT2(op)
Definition: tif_getimage.c:986

Definition at line 1018 of file tif_getimage.c.

#define UNROLL4 | ( |  | w,
|  |  | op1,
|  |  | op2
| ) |  |

Value:
{ \
uint32 _x; \
for (_x = w; _x >= 4; _x -= 4) { \
op1; \
REPEAT4(op2); \
} \
if (_x > 0) { \
op1; \
CASE4(_x,op2); \
} \
}
REPEAT4
#define REPEAT4(op)
Definition: tif_getimage.c:985
CASE4
#define CASE4(x, op)
Definition: tif_getimage.c:993

Definition at line 1007 of file tif_getimage.c.

#define UNROLL8 | ( |  | w,
|  |  | op1,
|  |  | op2
| ) |  |

Value:
{ \
uint32 _x; \
for (_x = w; _x >= 8; _x -= 8) { \
op1; \
REPEAT8(op2); \
} \
if (_x > 0) { \
op1; \
CASE8(_x,op2); \
} \
}
REPEAT8
#define REPEAT8(op)
Definition: tif_getimage.c:984
CASE8
#define CASE8(x, op)
Definition: tif_getimage.c:987

Definition at line 996 of file tif_getimage.c.

#define W2B | ( |  | v | ) | (((v)>>8)&0xff)

Definition at line 1038 of file tif_getimage.c.

#define YCbCrtoRGB | ( |  | dst,
|  |  | Y
| ) |  |

Value:
{ \
uint32 r, g, b; \
TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b); \
dst = PACK(r, g, b); \
}
b
long b
Definition: jpegint.h:371
PACK
#define PACK(r, g, b)
Definition: tif_getimage.c:1034
TIFFYCbCrtoRGB
void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, uint32 *r, uint32 *g, uint32 *b)
Definition: tif_color.c:183

Definition at line 1542 of file tif_getimage.c.

## Function Documentation

DECLAREContigPutFunc | ( | put8bitcmaptile |  | ) |

Definition at line 1057 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put4bitcmaptile |  | ) |

Definition at line 1077 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put2bitcmaptile |  | ) |

Definition at line 1094 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put1bitcmaptile |  | ) |

Definition at line 1111 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putgreytile |  | ) |

Definition at line 1128 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put16bitbwtile |  | ) |

Definition at line 1148 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put1bitbwtile |  | ) |

Definition at line 1173 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put2bitbwtile |  | ) |

Definition at line 1190 of file tif_getimage.c.

DECLAREContigPutFunc | ( | put4bitbwtile |  | ) |

Definition at line 1207 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBcontig8bittile |  | ) |

Definition at line 1224 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBAAcontig8bittile |  | ) |

Definition at line 1243 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBUAcontig8bittile |  | ) |

Definition at line 1262 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBcontig16bittile |  | ) |

Definition at line 1285 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBAAcontig16bittile |  | ) |

Definition at line 1305 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBUAcontig16bittile |  | ) |

Definition at line 1325 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBcontig8bitCMYKtile |  | ) |

Definition at line 1351 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putRGBcontig8bitCMYKMaptile |  | ) |

Definition at line 1376 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitCIELab |  | ) |

Definition at line 1516 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr44tile |  | ) |

Definition at line 1627 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr42tile |  | ) |

Definition at line 1724 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr41tile |  | ) |

Definition at line 1802 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr22tile |  | ) |

Definition at line 1846 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr21tile |  | ) |

Definition at line 1903 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr12tile |  | ) |

Definition at line 1939 of file tif_getimage.c.

DECLAREContigPutFunc | ( | putcontig8bitYCbCr11tile |  | ) |

Definition at line 1976 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBseparate8bittile |  | ) |

Definition at line 1411 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBAAseparate8bittile |  | ) |

Definition at line 1424 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBUAseparate8bittile |  | ) |

Definition at line 1437 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBseparate16bittile |  | ) |

Definition at line 1457 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBAAseparate16bittile |  | ) |

Definition at line 1474 of file tif_getimage.c.

DECLARESepPutFunc | ( | putRGBUAseparate16bittile |  | ) |

Definition at line 1492 of file tif_getimage.c.

DECLARESepPutFunc | ( | putseparate8bitYCbCr11tile |  | ) |

Definition at line 1998 of file tif_getimage.c.

int TIFFReadRGBAImage | ( | TIFF * | tif,
|  | uint32 | rwidth,
|  | uint32 | rheight,
|  | uint32 * | raster,
|  | int | stop
| ) |  |

Definition at line 495 of file tif_getimage.c.

int TIFFReadRGBAImageOriented | ( | TIFF * | tif,
|  | uint32 | rwidth,
|  | uint32 | rheight,
|  | uint32 * | raster,
|  | int | orientation,
|  | int | stop
| ) |  |

Definition at line 469 of file tif_getimage.c.

int TIFFReadRGBAStrip | ( | TIFF * | tif,
|  | uint32 | row,
|  | uint32 * | raster
| ) |  |

Definition at line 2521 of file tif_getimage.c.

int TIFFReadRGBATile | ( | TIFF * | tif,
|  | uint32 | col,
|  | uint32 | row,
|  | uint32 * | raster
| ) |  |

Definition at line 2572 of file tif_getimage.c.

int TIFFRGBAImageBegin | ( | TIFFRGBAImage * | img,
|  | TIFF * | tif,
|  | int | stop,
|  | char | emsg[1024]
| ) |  |

Definition at line 224 of file tif_getimage.c.

void TIFFRGBAImageEnd | ( | TIFFRGBAImage * | img | ) |

Definition at line 193 of file tif_getimage.c.

int TIFFRGBAImageGet | ( | TIFFRGBAImage * | img,
|  | uint32 * | raster,
|  | uint32 | w,
|  | uint32 | h
| ) |  |

Definition at line 450 of file tif_getimage.c.

int TIFFRGBAImageOK | ( | TIFF * | tif,
|  | char | emsg[1024]
| ) |  |

Definition at line 72 of file tif_getimage.c.

## Variable Documentation

TIFFDisplay display_sRGB

Initial value:
= {
{
{ 3.2410F, -1.5374F, -0.4986F },
{ -0.9692F, 1.8760F, 0.0416F },
{ 0.0556F, -0.2040F, 1.0570F }
},
100.0F, 100.0F, 100.0F,
255, 255, 255,
1.0F, 1.0F, 1.0F,
2.4F, 2.4F, 2.4F,
}

Definition at line 53 of file tif_getimage.c.