ReactOS 0.4.15-dev-8339-g4028de8
tif_jpeg_12.c
Go to the documentation of this file.
1
2#include <precomp.h>
3
4#if defined(JPEG_DUAL_MODE_8_12)
5
6# define TIFFInitJPEG TIFFInitJPEG_12
7# define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12
8
9int
10TIFFInitJPEG_12(TIFF* tif, int scheme);
11
12# include LIBJPEG_12_PATH
13
14# include "tif_jpeg.c"
15
16int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode )
17
18{
19 JPEGState* sp;
20
22
23 sp = JState(tif);
24 sp->tif = tif; /* back link */
25
26 /*
27 * Override parent get/set field methods.
28 */
29 tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */
30 tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */
31 tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */
32
33 /*
34 * Install codec methods.
35 */
36 tif->tif_fixuptags = JPEGFixupTags;
37 tif->tif_setupdecode = JPEGSetupDecode;
38 tif->tif_predecode = JPEGPreDecode;
39 tif->tif_decoderow = JPEGDecode;
40 tif->tif_decodestrip = JPEGDecode;
41 tif->tif_decodetile = JPEGDecode;
42 tif->tif_setupencode = JPEGSetupEncode;
43 tif->tif_preencode = JPEGPreEncode;
44 tif->tif_postencode = JPEGPostEncode;
45 tif->tif_encoderow = JPEGEncode;
46 tif->tif_encodestrip = JPEGEncode;
47 tif->tif_encodetile = JPEGEncode;
48 tif->tif_cleanup = JPEGCleanup;
49 tif->tif_defstripsize = JPEGDefaultStripSize;
50 tif->tif_deftilesize = JPEGDefaultTileSize;
51 tif->tif_flags |= TIFF_NOBITREV; /* no bit reversal, please */
52
53 sp->cinfo_initialized = FALSE;
54
55 if( is_encode )
56 return JPEGSetupEncode(tif);
57 else
58 return JPEGSetupDecode(tif);
59}
60
61#endif /* defined(JPEG_DUAL_MODE_8_12) */
62
63/*
64 * Local Variables:
65 * mode: c
66 * c-basic-offset: 8
67 * fill-column: 78
68 * End:
69 */
#define FALSE
Definition: types.h:117
#define assert(x)
Definition: debug.h:53
static const WCHAR sp[]
Definition: suminfo.c:287
DWORD scheme
TIFFVGetMethod vgetfield
Definition: tiffio.h:334
TIFFVSetMethod vsetfield
Definition: tiffio.h:333
TIFFPrintMethod printdir
Definition: tiffio.h:335
Definition: tiffiop.h:115
TIFFTileMethod tif_deftilesize
Definition: tiffiop.h:190
TIFFCodeMethod tif_encodestrip
Definition: tiffiop.h:183
TIFFCodeMethod tif_encodetile
Definition: tiffiop.h:185
TIFFTagMethods tif_tagmethods
Definition: tiffiop.h:219
TIFFPreMethod tif_preencode
Definition: tiffiop.h:178
TIFFBoolMethod tif_fixuptags
Definition: tiffiop.h:173
TIFFPreMethod tif_predecode
Definition: tiffiop.h:175
TIFFCodeMethod tif_decodestrip
Definition: tiffiop.h:182
TIFFStripMethod tif_defstripsize
Definition: tiffiop.h:189
uint32 tif_flags
Definition: tiffiop.h:119
TIFFCodeMethod tif_decoderow
Definition: tiffiop.h:180
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:176
TIFFBoolMethod tif_postencode
Definition: tiffiop.h:179
TIFFCodeMethod tif_encoderow
Definition: tiffiop.h:181
TIFFVoidMethod tif_cleanup
Definition: tiffiop.h:188
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:174
TIFFCodeMethod tif_decodetile
Definition: tiffiop.h:184
#define COMPRESSION_JPEG
Definition: tiff.h:166
#define TIFF_NOBITREV
Definition: tiffiop.h:127