ReactOS 0.4.16-dev-297-gc569aee
tif_codec.c File Reference
#include <precomp.h>
Include dependency graph for tif_codec.c:

Go to the source code of this file.

Macros

#define TIFFInitLZW   NotConfigured
 
#define TIFFInitPackBits   NotConfigured
 
#define TIFFInitThunderScan   NotConfigured
 
#define TIFFInitNeXT   NotConfigured
 
#define TIFFInitJPEG   NotConfigured
 
#define TIFFInitOJPEG   NotConfigured
 
#define TIFFInitCCITTRLE   NotConfigured
 
#define TIFFInitCCITTRLEW   NotConfigured
 
#define TIFFInitCCITTFax3   NotConfigured
 
#define TIFFInitCCITTFax4   NotConfigured
 
#define TIFFInitJBIG   NotConfigured
 
#define TIFFInitZIP   NotConfigured
 
#define TIFFInitPixarLog   NotConfigured
 
#define TIFFInitSGILog   NotConfigured
 
#define TIFFInitLZMA   NotConfigured
 
#define TIFFInitZSTD   NotConfigured
 
#define TIFFInitWebP   NotConfigured
 

Functions

static int NotConfigured (TIFF *, int)
 
static int _notConfigured (TIFF *tif)
 
int TIFFIsCODECConfigured (uint16 scheme)
 

Variables

TIFFCodec _TIFFBuiltinCODECS []
 

Macro Definition Documentation

◆ TIFFInitCCITTFax3

#define TIFFInitCCITTFax3   NotConfigured

Definition at line 56 of file tif_codec.c.

◆ TIFFInitCCITTFax4

#define TIFFInitCCITTFax4   NotConfigured

Definition at line 57 of file tif_codec.c.

◆ TIFFInitCCITTRLE

#define TIFFInitCCITTRLE   NotConfigured

Definition at line 54 of file tif_codec.c.

◆ TIFFInitCCITTRLEW

#define TIFFInitCCITTRLEW   NotConfigured

Definition at line 55 of file tif_codec.c.

◆ TIFFInitJBIG

#define TIFFInitJBIG   NotConfigured

Definition at line 60 of file tif_codec.c.

◆ TIFFInitJPEG

#define TIFFInitJPEG   NotConfigured

Definition at line 48 of file tif_codec.c.

◆ TIFFInitLZMA

#define TIFFInitLZMA   NotConfigured

Definition at line 72 of file tif_codec.c.

◆ TIFFInitLZW

#define TIFFInitLZW   NotConfigured

Definition at line 36 of file tif_codec.c.

◆ TIFFInitNeXT

#define TIFFInitNeXT   NotConfigured

Definition at line 45 of file tif_codec.c.

◆ TIFFInitOJPEG

#define TIFFInitOJPEG   NotConfigured

Definition at line 51 of file tif_codec.c.

◆ TIFFInitPackBits

#define TIFFInitPackBits   NotConfigured

Definition at line 39 of file tif_codec.c.

◆ TIFFInitPixarLog

#define TIFFInitPixarLog   NotConfigured

Definition at line 66 of file tif_codec.c.

◆ TIFFInitSGILog

#define TIFFInitSGILog   NotConfigured

Definition at line 69 of file tif_codec.c.

◆ TIFFInitThunderScan

#define TIFFInitThunderScan   NotConfigured

Definition at line 42 of file tif_codec.c.

◆ TIFFInitWebP

#define TIFFInitWebP   NotConfigured

Definition at line 78 of file tif_codec.c.

◆ TIFFInitZIP

#define TIFFInitZIP   NotConfigured

Definition at line 63 of file tif_codec.c.

◆ TIFFInitZSTD

#define TIFFInitZSTD   NotConfigured

Definition at line 75 of file tif_codec.c.

Function Documentation

◆ _notConfigured()

static int _notConfigured ( TIFF tif)
static

Definition at line 113 of file tif_codec.c.

114{
116 char compression_code[20];
117
118 sprintf(compression_code, "%d",tif->tif_dir.td_compression );
120 "%s compression support is not configured",
121 c ? c->name : compression_code );
122 return (0);
123}
const GLubyte * c
Definition: glext.h:8905
#define sprintf(buf, format,...)
Definition: sprintf.c:55
uint16 td_compression
Definition: tif_dir.h:77
thandle_t tif_clientdata
Definition: tiffiop.h:207
char * tif_name
Definition: tiffiop.h:116
TIFFDirectory tif_dir
Definition: tiffiop.h:151
const TIFFCodec * TIFFFindCODEC(uint16 scheme)
Definition: tif_compress.c:186
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65

Referenced by NotConfigured().

◆ NotConfigured()

static int NotConfigured ( TIFF tif,
int  scheme 
)
static

Definition at line 126 of file tif_codec.c.

127{
128 (void) scheme;
129
131 tif->tif_decodestatus = FALSE;
133 tif->tif_encodestatus = FALSE;
135 return (1);
136}
#define FALSE
Definition: types.h:117
DWORD scheme
TIFFBoolMethod tif_fixuptags
Definition: tiffiop.h:173
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:176
int tif_decodestatus
Definition: tiffiop.h:172
int tif_encodestatus
Definition: tiffiop.h:177
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:174
static int _notConfigured(TIFF *tif)
Definition: tif_codec.c:113

Referenced by TIFFIsCODECConfigured().

◆ TIFFIsCODECConfigured()

int TIFFIsCODECConfigured ( uint16  scheme)

Check whether we have working codec for the specific coding scheme.

Returns
returns 1 if the codec is configured and working. Otherwise 0 will be returned.

Definition at line 150 of file tif_codec.c.

151{
152 const TIFFCodec* codec = TIFFFindCODEC(scheme);
153
154 if(codec == NULL) {
155 return 0;
156 }
157 if(codec->init == NULL) {
158 return 0;
159 }
160 if(codec->init != NotConfigured){
161 return 1;
162 }
163 return 0;
164}
#define NULL
Definition: types.h:112
TIFFInitMethod init
Definition: tiffio.h:253
static int NotConfigured(TIFF *, int)
Definition: tif_codec.c:126

Referenced by TIFFGetConfiguredCODECs().

Variable Documentation

◆ _TIFFBuiltinCODECS

TIFFCodec _TIFFBuiltinCODECS[]
Initial value:
= {
{ "Old-style JPEG", COMPRESSION_OJPEG, TIFFInitOJPEG },
{ "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG },
{ "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP },
{ NULL, 0, NULL }
}
#define TIFFInitCCITTRLEW
Definition: tif_codec.c:55
#define TIFFInitLZW
Definition: tif_codec.c:36
#define TIFFInitPixarLog
Definition: tif_codec.c:66
#define TIFFInitJPEG
Definition: tif_codec.c:48
#define TIFFInitCCITTFax4
Definition: tif_codec.c:57
#define TIFFInitPackBits
Definition: tif_codec.c:39
#define TIFFInitNeXT
Definition: tif_codec.c:45
#define TIFFInitZSTD
Definition: tif_codec.c:75
#define TIFFInitJBIG
Definition: tif_codec.c:60
#define TIFFInitCCITTFax3
Definition: tif_codec.c:56
#define TIFFInitLZMA
Definition: tif_codec.c:72
#define TIFFInitSGILog
Definition: tif_codec.c:69
#define TIFFInitCCITTRLE
Definition: tif_codec.c:54
#define TIFFInitZIP
Definition: tif_codec.c:63
#define TIFFInitWebP
Definition: tif_codec.c:78
#define TIFFInitThunderScan
Definition: tif_codec.c:42
#define TIFFInitOJPEG
Definition: tif_codec.c:51
int TIFFInitDumpMode(TIFF *tif, int scheme)
Definition: tif_dumpmode.c:123
#define COMPRESSION_NONE
Definition: tiff.h:158
#define COMPRESSION_PIXARLOG
Definition: tiff.h:180
#define COMPRESSION_ZSTD
Definition: tiff.h:192
#define COMPRESSION_CCITTFAX3
Definition: tiff.h:160
#define COMPRESSION_CCITTRLE
Definition: tiff.h:159
#define COMPRESSION_OJPEG
Definition: tiff.h:165
#define COMPRESSION_DEFLATE
Definition: tiff.h:181
#define COMPRESSION_SGILOG
Definition: tiff.h:186
#define COMPRESSION_CCITTRLEW
Definition: tiff.h:170
#define COMPRESSION_LZMA
Definition: tiff.h:191
#define COMPRESSION_WEBP
Definition: tiff.h:193
#define COMPRESSION_JBIG
Definition: tiff.h:185
#define COMPRESSION_ADOBE_DEFLATE
Definition: tiff.h:182
#define COMPRESSION_PACKBITS
Definition: tiff.h:171
#define COMPRESSION_LZW
Definition: tiff.h:164
#define COMPRESSION_SGILOG24
Definition: tiff.h:187
#define COMPRESSION_CCITTFAX4
Definition: tiff.h:162
#define COMPRESSION_NEXT
Definition: tiff.h:169
#define COMPRESSION_JPEG
Definition: tiff.h:166
#define COMPRESSION_THUNDERSCAN
Definition: tiff.h:172

Definition at line 87 of file tif_codec.c.

Referenced by TIFFFindCODEC(), and TIFFGetConfiguredCODECs().