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
16 /*
17 * tiffiostub.c
18 *
19 * Stubs for tiffio.c functions
20 */
21
22 #include <stdio.h>
23 #include "allheaders.h"
24
25 #ifdef HAVE_CONFIG_H
26 #include "config_auto.h"
27 #endif /* HAVE_CONFIG_H */
28
29 /* --------------------------------------------*/
30 #if !HAVE_LIBTIFF /* defined in environ.h */
31 /* --------------------------------------------*/
32
pixReadTiff(const char * filename,l_int32 n)33 PIX * pixReadTiff(const char *filename, l_int32 n)
34 {
35 return (PIX * )ERROR_PTR("function not present", "pixReadTiff", NULL);
36 }
37
pixReadStreamTiff(FILE * fp,l_int32 n)38 PIX * pixReadStreamTiff(FILE *fp, l_int32 n)
39 {
40 return (PIX * )ERROR_PTR("function not present", "pixReadStreamTiff", NULL);
41 }
42
pixWriteTiff(const char * filename,PIX * pix,l_int32 comptype,const char * modestring)43 l_int32 pixWriteTiff(const char *filename, PIX *pix, l_int32 comptype,
44 const char *modestring)
45 {
46 return ERROR_INT("function not present", "pixWriteTiff", 1);
47 }
48
pixWriteTiffCustom(const char * filename,PIX * pix,l_int32 comptype,const char * modestring,NUMA * natags,SARRAY * savals,SARRAY * satypes,NUMA * nasizes)49 l_int32 pixWriteTiffCustom(const char *filename, PIX *pix, l_int32 comptype,
50 const char *modestring, NUMA *natags,
51 SARRAY *savals, SARRAY *satypes, NUMA *nasizes)
52 {
53 return ERROR_INT("function not present", "pixWriteTiffCustom", 1);
54 }
55
pixWriteStreamTiff(FILE * fp,PIX * pix,l_int32 comptype)56 l_int32 pixWriteStreamTiff(FILE *fp, PIX *pix, l_int32 comptype)
57 {
58 return ERROR_INT("function not present", "pixWriteStreamTiff", 1);
59 }
60
pixaReadMultipageTiff(const char * filename)61 PIXA * pixaReadMultipageTiff(const char *filename)
62 {
63 return (PIXA * )ERROR_PTR("function not present",
64 "pixaReadMultipageTiff", NULL);
65 }
66
writeMultipageTiff(const char * dirin,const char * substr,const char * fileout)67 l_int32 writeMultipageTiff(const char *dirin, const char *substr,
68 const char *fileout)
69 {
70 return ERROR_INT("function not present", "writeMultipageTiff", 1);
71 }
72
writeMultipageTiffSA(SARRAY * sa,const char * fileout)73 l_int32 writeMultipageTiffSA(SARRAY *sa, const char *fileout)
74 {
75 return ERROR_INT("function not present", "writeMultipageTiffSA", 1);
76 }
77
fprintTiffInfo(FILE * fpout,const char * tiffile)78 l_int32 fprintTiffInfo(FILE *fpout, const char *tiffile)
79 {
80 return ERROR_INT("function not present", "fprintTiffInfo", 1);
81 }
82
tiffGetCount(FILE * fp,l_int32 * pn)83 l_int32 tiffGetCount(FILE *fp, l_int32 *pn)
84 {
85 return ERROR_INT("function not present", "tiffGetCount", 1);
86 }
87
readHeaderTiff(const char * filename,l_int32 n,l_int32 * pwidth,l_int32 * pheight,l_int32 * pbps,l_int32 * pspp,l_int32 * pres,l_int32 * pcmap,l_int32 * pformat)88 l_int32 readHeaderTiff(const char *filename, l_int32 n, l_int32 *pwidth,
89 l_int32 *pheight, l_int32 *pbps, l_int32 *pspp,
90 l_int32 *pres, l_int32 *pcmap, l_int32 *pformat)
91 {
92 return ERROR_INT("function not present", "readHeaderTiff", 1);
93 }
94
freadHeaderTiff(FILE * fp,l_int32 n,l_int32 * pwidth,l_int32 * pheight,l_int32 * pbps,l_int32 * pspp,l_int32 * pres,l_int32 * pcmap,l_int32 * pformat)95 l_int32 freadHeaderTiff(FILE *fp, l_int32 n, l_int32 *pwidth,
96 l_int32 *pheight, l_int32 *pbps, l_int32 *pspp,
97 l_int32 *pres, l_int32 *pcmap, l_int32 *pformat)
98 {
99 return ERROR_INT("function not present", "freadHeaderTiff", 1);
100 }
101
readHeaderMemTiff(const l_uint8 * cdata,size_t size,l_int32 n,l_int32 * pwidth,l_int32 * pheight,l_int32 * pbps,l_int32 * pspp,l_int32 * pres,l_int32 * pcmap,l_int32 * pformat)102 l_int32 readHeaderMemTiff(const l_uint8 *cdata, size_t size, l_int32 n,
103 l_int32 *pwidth, l_int32 *pheight, l_int32 *pbps,
104 l_int32 *pspp, l_int32 *pres, l_int32 *pcmap,
105 l_int32 *pformat)
106 {
107 return ERROR_INT("function not present", "readHeaderMemTiff", 1);
108 }
109
findTiffCompression(FILE * fp,l_int32 * pcomptype)110 l_int32 findTiffCompression(FILE *fp, l_int32 *pcomptype)
111 {
112 return ERROR_INT("function not present", "findTiffCompression", 1);
113 }
114
extractTiffG4DataFromFile(const char * filein,l_uint8 ** pdata,l_int32 * pnbytes,l_int32 * pw,l_int32 * ph,l_int32 * pminisblack)115 l_int32 extractTiffG4DataFromFile(const char *filein, l_uint8 **pdata,
116 l_int32 *pnbytes, l_int32 *pw,
117 l_int32 *ph, l_int32 *pminisblack)
118 {
119 return ERROR_INT("function not present", "extractTiffG4DataFromFile", 1);
120 }
121
pixReadMemTiff(const l_uint8 * cdata,size_t size,l_int32 n)122 PIX * pixReadMemTiff(const l_uint8 *cdata, size_t size, l_int32 n)
123 {
124 return (PIX *)ERROR_PTR("function not present", "pixReadMemTiff", NULL);
125 }
126
pixWriteMemTiff(l_uint8 ** pdata,size_t * psize,PIX * pix,l_int32 comptype)127 l_int32 pixWriteMemTiff(l_uint8 **pdata, size_t *psize, PIX *pix,
128 l_int32 comptype)
129 {
130 return ERROR_INT("function not present", "pixWriteMemTiff", 1);
131 }
132
pixWriteMemTiffCustom(l_uint8 ** pdata,size_t * psize,PIX * pix,l_int32 comptype,NUMA * natags,SARRAY * savals,SARRAY * satypes,NUMA * nasizes)133 l_int32 pixWriteMemTiffCustom(l_uint8 **pdata, size_t *psize, PIX *pix,
134 l_int32 comptype, NUMA *natags, SARRAY *savals,
135 SARRAY *satypes, NUMA *nasizes)
136 {
137 return ERROR_INT("function not present", "pixWriteMemTiffCustom", 1);
138 }
139
140 /* --------------------------------------------*/
141 #endif /* !HAVE_LIBTIFF */
142 /* --------------------------------------------*/
143
144