Leptonica 1.68
C Image Processing Library

jpegiostub.c

Go to the documentation of this file.
00001 /*====================================================================*
00002  -  Copyright (C) 2001 Leptonica.  All rights reserved.
00003  -  This software is distributed in the hope that it will be
00004  -  useful, but with NO WARRANTY OF ANY KIND.
00005  -  No author or distributor accepts responsibility to anyone for the
00006  -  consequences of using this software, or for whether it serves any
00007  -  particular purpose or works at all, unless he or she says so in
00008  -  writing.  Everyone is granted permission to copy, modify and
00009  -  redistribute this source code, for commercial or non-commercial
00010  -  purposes, with the following restrictions: (1) the origin of this
00011  -  source code must not be misrepresented; (2) modified versions must
00012  -  be plainly marked as such; and (3) this notice may not be removed
00013  -  or altered from any source or modified source distribution.
00014  *====================================================================*/
00015 
00016 /*
00017  *  jpegiostub.c
00018  *
00019  *     Stubs for jpegio.c functions
00020  */
00021 
00022 #include "allheaders.h"
00023 
00024 #ifdef HAVE_CONFIG_H
00025 #include "config_auto.h"
00026 #endif  /* HAVE_CONFIG_H */
00027 
00028 /* --------------------------------------------*/
00029 #if  !HAVE_LIBJPEG   /* defined in environ.h */
00030 /* --------------------------------------------*/
00031 
00032 PIX * pixReadJpeg(const char *filename, l_int32 cmflag, l_int32 reduction,
00033                   l_int32 *pnwarn)
00034 {
00035     return (PIX * )ERROR_PTR("function not present", "pixReadJpeg", NULL);
00036 }
00037 
00038 PIX * pixReadStreamJpeg(FILE *fp, l_int32 cmflag, l_int32 reduction,
00039                         l_int32 *pnwarn, l_int32 hint)
00040 {
00041     return (PIX * )ERROR_PTR("function not present", "pixReadStreamJpeg", NULL);
00042 }
00043 
00044 l_int32 readHeaderJpeg(const char *filename, l_int32 *pw, l_int32 *ph,
00045                        l_int32 *pspp, l_int32 *pycck, l_int32 *pcmyk)
00046 {
00047     return ERROR_INT("function not present", "readHeaderJpeg", 1);
00048 }
00049 
00050 l_int32 freadHeaderJpeg(FILE *fp, l_int32 *pw, l_int32 *ph,
00051                        l_int32 *pspp, l_int32 *pycck, l_int32 *pcmyk)
00052 {
00053     return ERROR_INT("function not present", "freadHeaderJpeg", 1);
00054 }
00055 
00056 l_int32 fgetJpegResolution(FILE *fp, l_int32 *pxres, l_int32 *pyres)
00057 {
00058     return ERROR_INT("function not present", "fgetJpegResolution", 1);
00059 }
00060 
00061 l_int32 pixWriteJpeg(const char *filename, PIX *pix, l_int32 quality,
00062                      l_int32 progressive)
00063 {
00064     return ERROR_INT("function not present", "pixWriteJpeg", 1);
00065 }
00066 
00067 l_int32 pixWriteStreamJpeg(FILE *fp, PIX *pix, l_int32 quality,
00068                            l_int32 progressive)
00069 {
00070     return ERROR_INT("function not present", "pixWriteStreamJpeg", 1);
00071 }
00072 
00073 PIX * pixReadMemJpeg(const l_uint8 *cdata, size_t size, l_int32 cmflag,
00074                      l_int32 reduction, l_int32 *pnwarn, l_int32 hint)
00075 {
00076     return (PIX * )ERROR_PTR("function not present", "pixReadMemJpeg", NULL);
00077 }
00078 
00079 l_int32 readHeaderMemJpeg(const l_uint8 *cdata, size_t size,
00080                           l_int32 *pw, l_int32 *ph, l_int32 *pspp,
00081                           l_int32 *pycck, l_int32 *pcmyk)
00082 {
00083     return ERROR_INT("function not present", "readHeaderMemJpeg", 1);
00084 }
00085 
00086 l_int32 pixWriteMemJpeg(l_uint8 **pdata, size_t *psize, PIX *pix,
00087                         l_int32 quality, l_int32 progressive)
00088 {
00089     return ERROR_INT("function not present", "pixWriteMemJpeg", 1);
00090 }
00091 
00092 void l_jpegSetNoChromaSampling(l_int32 flag)
00093 {
00094     L_ERROR("function not present", "l_jpegSetNoChromaSampling");
00095     return;
00096 }
00097 
00098 l_int32 extractJpegDataFromFile(const char *filein, l_uint8 **pdata,
00099                                 size_t *pnbytes, l_int32 *pw, l_int32 *ph,
00100                                 l_int32 *pbps, l_int32 *pspp)
00101 {
00102     return ERROR_INT("function not present", "extractJpegDataFromFile", 1);
00103 }
00104 
00105 l_int32 extractJpegDataFromArray(const void *data, size_t nbytes,
00106                                  l_int32 *pw, l_int32 *ph, l_int32 *pbps,
00107                                  l_int32 *pspp)
00108 {
00109     return ERROR_INT("function not present", "extractJpegDataFromArray", 1);
00110 }
00111 
00112 /* --------------------------------------------*/
00113 #endif  /* !HAVE_LIBJPEG */
00114 /* --------------------------------------------*/
00115 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines