Commit 5c709f4a authored by Alexander Alekhin's avatar Alexander Alekhin

3rdparty: update libtiff 4.0.9

parent ae5e1f8e
This diff is collapsed.
This diff is collapsed.
/* $Id: tif_close.c,v 1.19 2010-03-10 18:56:48 bfriesen Exp $ */ /* $Id: tif_close.c,v 1.21 2016-01-23 21:20:34 erouault Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc. * Copyright (c) 1991-1997 Silicon Graphics, Inc.
* *
* Permission to use, copy, modify, distribute, and sell this software and * Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided * its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in * that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of * all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or * Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written * publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics. * permission of Sam Leffler and Silicon Graphics.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
...@@ -36,61 +36,61 @@ ...@@ -36,61 +36,61 @@
/** /**
* Auxiliary function to free the TIFF structure. Given structure will be * Auxiliary function to free the TIFF structure. Given structure will be
* completetly freed, so you should save opened file handle and pointer * completely freed, so you should save opened file handle and pointer
* to the close procedure in external variables before calling * to the close procedure in external variables before calling
* _TIFFCleanup(), if you will need these ones to close the file. * _TIFFCleanup(), if you will need these ones to close the file.
* *
* @param tif A TIFF pointer. * @param tif A TIFF pointer.
*/ */
void void
TIFFCleanup(TIFF* tif) TIFFCleanup(TIFF* tif)
{ {
/* /*
* Flush buffered data and directory (if dirty). * Flush buffered data and directory (if dirty).
*/ */
if (tif->tif_mode != O_RDONLY) if (tif->tif_mode != O_RDONLY)
TIFFFlush(tif); TIFFFlush(tif);
(*tif->tif_cleanup)(tif); (*tif->tif_cleanup)(tif);
TIFFFreeDirectory(tif); TIFFFreeDirectory(tif);
if (tif->tif_dirlist) if (tif->tif_dirlist)
_TIFFfree(tif->tif_dirlist); _TIFFfree(tif->tif_dirlist);
/* /*
* Clean up client info links. * Clean up client info links.
*/ */
while( tif->tif_clientinfo ) while( tif->tif_clientinfo )
{ {
TIFFClientInfoLink *link = tif->tif_clientinfo; TIFFClientInfoLink *psLink = tif->tif_clientinfo;
tif->tif_clientinfo = link->next; tif->tif_clientinfo = psLink->next;
_TIFFfree( link->name ); _TIFFfree( psLink->name );
_TIFFfree( link ); _TIFFfree( psLink );
} }
if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER)) if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER))
_TIFFfree(tif->tif_rawdata); _TIFFfree(tif->tif_rawdata);
if (isMapped(tif)) if (isMapped(tif))
TIFFUnmapFileContents(tif, tif->tif_base, (toff_t)tif->tif_size); TIFFUnmapFileContents(tif, tif->tif_base, (toff_t)tif->tif_size);
/* /*
* Clean up custom fields. * Clean up custom fields.
*/ */
if (tif->tif_fields && tif->tif_nfields > 0) { if (tif->tif_fields && tif->tif_nfields > 0) {
uint32 i; uint32 i;
for (i = 0; i < tif->tif_nfields; i++) { for (i = 0; i < tif->tif_nfields; i++) {
TIFFField *fld = tif->tif_fields[i]; TIFFField *fld = tif->tif_fields[i];
if (fld->field_bit == FIELD_CUSTOM && if (fld->field_bit == FIELD_CUSTOM &&
strncmp("Tag ", fld->field_name, 4) == 0) { strncmp("Tag ", fld->field_name, 4) == 0) {
_TIFFfree(fld->field_name); _TIFFfree(fld->field_name);
_TIFFfree(fld); _TIFFfree(fld);
} }
} }
_TIFFfree(tif->tif_fields); _TIFFfree(tif->tif_fields);
} }
if (tif->tif_nfieldscompat > 0) { if (tif->tif_nfieldscompat > 0) {
uint32 i; uint32 i;
...@@ -102,7 +102,7 @@ TIFFCleanup(TIFF* tif) ...@@ -102,7 +102,7 @@ TIFFCleanup(TIFF* tif)
_TIFFfree(tif->tif_fieldscompat); _TIFFfree(tif->tif_fieldscompat);
} }
_TIFFfree(tif); _TIFFfree(tif);
} }
/************************************************************************/ /************************************************************************/
...@@ -115,18 +115,18 @@ TIFFCleanup(TIFF* tif) ...@@ -115,18 +115,18 @@ TIFFCleanup(TIFF* tif)
* TIFFClose closes a file that was previously opened with TIFFOpen(). * TIFFClose closes a file that was previously opened with TIFFOpen().
* Any buffered data are flushed to the file, including the contents of * Any buffered data are flushed to the file, including the contents of
* the current directory (if modified); and all resources are reclaimed. * the current directory (if modified); and all resources are reclaimed.
* *
* @param tif A TIFF pointer. * @param tif A TIFF pointer.
*/ */
void void
TIFFClose(TIFF* tif) TIFFClose(TIFF* tif)
{ {
TIFFCloseProc closeproc = tif->tif_closeproc; TIFFCloseProc closeproc = tif->tif_closeproc;
thandle_t fd = tif->tif_clientdata; thandle_t fd = tif->tif_clientdata;
TIFFCleanup(tif); TIFFCleanup(tif);
(void) (*closeproc)(fd); (void) (*closeproc)(fd);
} }
/* vim: set ts=8 sts=8 sw=8 noet: */ /* vim: set ts=8 sts=8 sw=8 noet: */
......
/* $Id: tif_codec.c,v 1.15 2010-12-14 12:53:00 dron Exp $ */ /* $Id: tif_codec.c,v 1.17 2015-08-19 02:31:04 bfriesen Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc. * Copyright (c) 1991-1997 Silicon Graphics, Inc.
* *
* Permission to use, copy, modify, distribute, and sell this software and * Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided * its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in * that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of * all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or * Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written * publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics. * permission of Sam Leffler and Silicon Graphics.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
...@@ -94,7 +94,7 @@ TIFFCodec _TIFFBuiltinCODECS[] = { ...@@ -94,7 +94,7 @@ TIFFCodec _TIFFBuiltinCODECS[] = {
{ "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 }, { "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 },
{ "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG }, { "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG },
{ "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP }, { "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP },
{ "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP }, { "AdobeDeflate", COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP },
{ "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog }, { "PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog },
{ "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog }, { "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog },
{ "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog }, { "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog },
...@@ -105,27 +105,27 @@ TIFFCodec _TIFFBuiltinCODECS[] = { ...@@ -105,27 +105,27 @@ TIFFCodec _TIFFBuiltinCODECS[] = {
static int static int
_notConfigured(TIFF* tif) _notConfigured(TIFF* tif)
{ {
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
char compression_code[20]; char compression_code[20];
sprintf( compression_code, "%d", tif->tif_dir.td_compression ); sprintf(compression_code, "%d",tif->tif_dir.td_compression );
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"%s compression support is not configured", "%s compression support is not configured",
c ? c->name : compression_code ); c ? c->name : compression_code );
return (0); return (0);
} }
static int static int
NotConfigured(TIFF* tif, int scheme) NotConfigured(TIFF* tif, int scheme)
{ {
(void) scheme; (void) scheme;
tif->tif_fixuptags = _notConfigured; tif->tif_fixuptags = _notConfigured;
tif->tif_decodestatus = FALSE; tif->tif_decodestatus = FALSE;
tif->tif_setupdecode = _notConfigured; tif->tif_setupdecode = _notConfigured;
tif->tif_encodestatus = FALSE; tif->tif_encodestatus = FALSE;
tif->tif_setupencode = _notConfigured; tif->tif_setupencode = _notConfigured;
return (1); return (1);
} }
/************************************************************************/ /************************************************************************/
...@@ -142,18 +142,18 @@ NotConfigured(TIFF* tif, int scheme) ...@@ -142,18 +142,18 @@ NotConfigured(TIFF* tif, int scheme)
int int
TIFFIsCODECConfigured(uint16 scheme) TIFFIsCODECConfigured(uint16 scheme)
{ {
const TIFFCodec* codec = TIFFFindCODEC(scheme); const TIFFCodec* codec = TIFFFindCODEC(scheme);
if(codec == NULL) { if(codec == NULL) {
return 0; return 0;
} }
if(codec->init == NULL) { if(codec->init == NULL) {
return 0; return 0;
} }
if(codec->init != NotConfigured){ if(codec->init != NotConfigured){
return 1; return 1;
} }
return 0; return 0;
} }
/* /*
......
This diff is collapsed.
This diff is collapsed.
/* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */
/* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */
/* Support CCITT Group 3 & 4 algorithms */
#cmakedefine CCITT_SUPPORT 1
/* Pick up YCbCr subsampling info from the JPEG data stream to support files
lacking the tag (default enabled). */
#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1
/* enable partial strip reading for large strips (experimental) */
#cmakedefine CHUNKY_STRIP_READ_SUPPORT 1
/* Support C++ stream API (requires C++ compiler) */
#cmakedefine CXX_SUPPORT 1
/* enable deferred strip/tile offset/size loading (experimental) */
#cmakedefine DEFER_STRILE_LOAD 1
/* Define to 1 if you have the <assert.h> header file. */
#cmakedefine HAVE_ASSERT_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
/* Define to 1 if you have the `floor' function. */
#cmakedefine HAVE_FLOOR 1
/* Define to 1 if you have the `getopt' function. */
#cmakedefine HAVE_GETOPT 1
/* Define to 1 if you have the <GLUT/glut.h> header file. */
#cmakedefine HAVE_GLUT_GLUT_H 1
/* Define to 1 if you have the <GL/glut.h> header file. */
#cmakedefine HAVE_GL_GLUT_H 1
/* Define to 1 if you have the <GL/glu.h> header file. */
#cmakedefine HAVE_GL_GLU_H 1
/* Define to 1 if you have the <GL/gl.h> header file. */
#cmakedefine HAVE_GL_GL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H 1
/* Define to 1 if you have the `isascii' function. */
#cmakedefine HAVE_ISASCII 1
/* Define to 1 if you have the `jbg_newlen' function. */
#cmakedefine HAVE_JBG_NEWLEN 1
/* Define to 1 if you have the `lfind' function. */
#cmakedefine HAVE_LFIND 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#cmakedefine HAVE_MALLOC_H 1
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#cmakedefine HAVE_MEMSET 1
/* Define to 1 if you have the `mmap' function. */
#cmakedefine HAVE_MMAP 1
/* Define to 1 if you have the <OpenGL/glu.h> header file. */
#cmakedefine HAVE_OPENGL_GLU_H 1
/* Define to 1 if you have the <OpenGL/gl.h> header file. */
#cmakedefine HAVE_OPENGL_GL_H 1
/* Define to 1 if you have the `pow' function. */
#cmakedefine HAVE_POW 1
/* Define to 1 if you have the <search.h> header file. */
#cmakedefine HAVE_SEARCH_H 1
/* Define to 1 if you have the `setmode' function. */
#cmakedefine HAVE_SETMODE 1
/* Define to 1 if you have the `snprintf' function. */
#cmakedefine HAVE_SNPRINTF 1
/* Define to 1 if you have the `sqrt' function. */
#cmakedefine HAVE_SQRT 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#cmakedefine HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#cmakedefine HAVE_STRCHR 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the `strrchr' function. */
#cmakedefine HAVE_STRRCHR 1
/* Define to 1 if you have the `strstr' function. */
#cmakedefine HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#cmakedefine HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#cmakedefine HAVE_STRTOUL 1
/* Define to 1 if you have the `strtoull' function. */
#cmakedefine HAVE_STRTOULL 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* 8/12 bit libjpeg dual mode enabled */
#cmakedefine JPEG_DUAL_MODE_8_12 1
/* 12bit libjpeg primary include file with path */
#define LIBJPEG_12_PATH @LIBJPEG_12_PATH@
/* Support LZMA2 compression */
#cmakedefine LZMA_SUPPORT 1
/* Name of package */
#define PACKAGE "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#define PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL "@PACKAGE_URL@"
/* Define to the version of this package. */
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
/* The size of `signed int', as computed by sizeof. */
#define SIZEOF_SIGNED_INT @SIZEOF_SIGNED_INT@
/* The size of `signed long', as computed by sizeof. */
#define SIZEOF_SIGNED_LONG @SIZEOF_SIGNED_LONG@
/* The size of `signed long long', as computed by sizeof. */
#define SIZEOF_SIGNED_LONG_LONG @SIZEOF_SIGNED_LONG_LONG@
/* The size of `signed short', as computed by sizeof. */
#define SIZEOF_SIGNED_SHORT @SIZEOF_SIGNED_SHORT@
/* The size of `unsigned char *', as computed by sizeof. */
#define SIZEOF_UNSIGNED_CHAR_P @SIZEOF_UNSIGNED_CHAR_P@
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@
/* The size of `unsigned long long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@
/* The size of `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@
/* Default size of the strip in bytes (when strip chopping enabled) */
#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@
/* Signed 32-bit type formatter */
#define TIFF_INT32_FORMAT "@TIFF_INT32_FORMAT@"
/* Signed 64-bit type formatter */
#define TIFF_INT64_FORMAT "@TIFF_INT64_FORMAT@"
/* Pointer difference type formatter */
#define TIFF_PTRDIFF_FORMAT "@TIFF_PTRDIFF_FORMAT@"
/* Unsigned size type formatter */
#define TIFF_SIZE_FORMAT "@TIFF_SIZE_FORMAT@"
/* Signed size type formatter */
#define TIFF_SSIZE_FORMAT "@TIFF_SSIZE_FORMAT@"
/* Unsigned 32-bit type formatter */
#define TIFF_UINT32_FORMAT "@TIFF_UINT32_FORMAT@"
/* Unsigned 64-bit type formatter */
#define TIFF_UINT64_FORMAT "@TIFF_UINT64_FORMAT@"
/* Unsigned 8-bit type */
#define TIFF_UINT8_T @TIFF_UINT8_T@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#cmakedefine TM_IN_SYS_TIME 1
/* define to use win32 IO system */
#cmakedefine USE_WIN32_FILEIO 1
/* Version number of package */
#define VERSION "@PACKAGE_VERSION@"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS @FILE_OFFSET_BITS@
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#define inline @INLINE_KEYWORD@
#endif
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* libtiff/tif_config.h. Generated from tif_config.h.in by configure. */
/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */
/* Support CCITT Group 3 & 4 algorithms */
#define CCITT_SUPPORT 1
/* Pick up YCbCr subsampling info from the JPEG data stream to support files
lacking the tag (default enabled). */
#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
/* enable partial strip reading for large strips (experimental) */
#undef CHUNKY_STRIP_READ_SUPPORT
/* Treat extra sample as alpha (default enabled). The RGBA interface will
treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
packages produce RGBA files but don't mark the alpha properly. */
#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
/* enable deferred strip/tile offset/size loading (experimental) */
#undef DEFER_STRILE_LOAD
/* Define to 1 if you have the <assert.h> header file. */
#cmakedefine HAVE_ASSERT_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define as 0 or 1 according to the floating point format suported by the
machine */
#define HAVE_IEEEFP 1
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H
/* Define to 1 if you have the `jbg_newlen' function. */
#cmakedefine HAVE_JBG_NEWLEN
/* Define to 1 if you have the `mmap' function. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <search.h> header file. */
#cmakedefine HAVE_SEARCH_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef HAVE_UNISTD_H
#cmakedefine HAVE_UNISTD_H
#endif
/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
(Intel) */
#define HOST_BIGENDIAN @WORDS_BIGENDIAN@
/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
#define HOST_FILLORDER FILLORDER_LSB2MSB
/* Support ISO JBIG compression (requires JBIG-KIT library) */
#undef JBIG_SUPPORT
/* 8/12 bit libjpeg dual mode enabled */
/* #undef JPEG_DUAL_MODE_8_12 */
/* Support JPEG compression (requires IJG JPEG library) */
#undef JPEG_SUPPORT
/* 12bit libjpeg primary include file with path */
/* #undef LIBJPEG_12_PATH */
/* Support LogLuv high dynamic range encoding */
#define LOGLUV_SUPPORT 1
/* Support LZMA2 compression */
/* #undef LZMA_SUPPORT */
/* Support LZW algorithm */
#define LZW_SUPPORT 1
/* Support Microsoft Document Imaging format */
#define MDI_SUPPORT 1
/* Support NeXT 2-bit RLE algorithm */
#define NEXT_SUPPORT 1
/* Support Old JPEG compresson (read-only) */
#undef OJPEG_SUPPORT
/* Support Macintosh PackBits algorithm */
#define PACKBITS_SUPPORT 1
/* Support Pixar log-format algorithm (requires Zlib) */
#define PIXARLOG_SUPPORT 1
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 8
/* Support strip chopping (whether or not to convert single-strip uncompressed
images to mutiple strips of specified size to reduce memory usage) */
#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
/* Default size of the strip in bytes (when strip chopping enabled) */
//#define STRIP_SIZE_DEFAULT 8192
/* Support ThunderScan 4-bit RLE algorithm */
#define THUNDER_SUPPORT 1
/* Signed 8-bit type */
#define TIFF_INT8_T signed char
/* Signed 16-bit type */
#define TIFF_INT16_T signed short
/* Signed 32-bit type */
#define TIFF_INT32_T signed int
/* Signed size type */
#define TIFF_SSIZE_T size_t
/* Unsigned 8-bit type */
#define TIFF_UINT8_T unsigned char
/* Unsigned 16-bit type */
#define TIFF_UINT16_T unsigned short
/* Unsigned 32-bit type */
#define TIFF_UINT32_T unsigned int
#ifdef _MSC_VER
/* Signed 64-bit type */
# define TIFF_INT64_T signed __int64
/* Unsigned 64-bit type */
# define TIFF_UINT64_T unsigned __int64
#else
/* Signed 64-bit type */
# define TIFF_INT64_T long long
/* Signed 64-bit type */
# define TIFF_UINT64_T unsigned long long
#endif
/* Signed 64-bit type formatter */
/* Unsigned 64-bit type formatter */
#if defined _MSC_VER || defined __MINGW__ || defined __MINGW32__
# define TIFF_UINT64_FORMAT "%I64u"
# define TIFF_SSIZE_FORMAT "%Iu"
#else
# define TIFF_UINT64_FORMAT "%llu"
# define TIFF_SSIZE_FORMAT "%zd"
#endif
/* define to use win32 IO system */
#cmakedefine USE_WIN32_FILEIO
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN 1
/* Support Deflate compression */
#define ZIP_SUPPORT 1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.14 2011-04-02 20:54:09 bfriesen Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.15 2015-12-12 18:04:26 erouault Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc. * Copyright (c) 1991-1997 Silicon Graphics, Inc.
* *
* Permission to use, copy, modify, distribute, and sell this software and * Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided * its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in * that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of * all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or * Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written * publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics. * permission of Sam Leffler and Silicon Graphics.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
static int static int
DumpFixupTags(TIFF* tif) DumpFixupTags(TIFF* tif)
{ {
(void) tif; (void) tif;
return (1); return (1);
} }
/* /*
...@@ -44,31 +44,31 @@ DumpFixupTags(TIFF* tif) ...@@ -44,31 +44,31 @@ DumpFixupTags(TIFF* tif)
static int static int
DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s)
{ {
(void) s; (void) s;
while (cc > 0) { while (cc > 0) {
tmsize_t n; tmsize_t n;
n = cc; n = cc;
if (tif->tif_rawcc + n > tif->tif_rawdatasize) if (tif->tif_rawcc + n > tif->tif_rawdatasize)
n = tif->tif_rawdatasize - tif->tif_rawcc; n = tif->tif_rawdatasize - tif->tif_rawcc;
assert( n > 0 ); assert( n > 0 );
/* /*
* Avoid copy if client has setup raw * Avoid copy if client has setup raw
* data buffer to avoid extra copy. * data buffer to avoid extra copy.
*/ */
if (tif->tif_rawcp != pp) if (tif->tif_rawcp != pp)
_TIFFmemcpy(tif->tif_rawcp, pp, n); _TIFFmemcpy(tif->tif_rawcp, pp, n);
tif->tif_rawcp += n; tif->tif_rawcp += n;
tif->tif_rawcc += n; tif->tif_rawcc += n;
pp += n; pp += n;
cc -= n; cc -= n;
if (tif->tif_rawcc >= tif->tif_rawdatasize && if (tif->tif_rawcc >= tif->tif_rawdatasize &&
!TIFFFlushData1(tif)) !TIFFFlushData1(tif))
return (-1); return (0);
} }
return (1); return (1);
} }
/* /*
...@@ -77,33 +77,33 @@ DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) ...@@ -77,33 +77,33 @@ DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s)
static int static int
DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
{ {
static const char module[] = "DumpModeDecode"; static const char module[] = "DumpModeDecode";
(void) s; (void) s;
if (tif->tif_rawcc < cc) { if (tif->tif_rawcc < cc) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module, TIFFErrorExt(tif->tif_clientdata, module,
"Not enough data for scanline %lu, expected a request for at most %I64d bytes, got a request for %I64d bytes", "Not enough data for scanline %lu, expected a request for at most %I64d bytes, got a request for %I64d bytes",
(unsigned long) tif->tif_row, (unsigned long) tif->tif_row,
(signed __int64) tif->tif_rawcc, (signed __int64) tif->tif_rawcc,
(signed __int64) cc); (signed __int64) cc);
#else #else
TIFFErrorExt(tif->tif_clientdata, module, TIFFErrorExt(tif->tif_clientdata, module,
"Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes", "Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes",
(unsigned long) tif->tif_row, (unsigned long) tif->tif_row,
(signed long long) tif->tif_rawcc, (signed long long) tif->tif_rawcc,
(signed long long) cc); (signed long long) cc);
#endif #endif
return (0); return (0);
} }
/* /*
* Avoid copy if client has setup raw * Avoid copy if client has setup raw
* data buffer to avoid extra copy. * data buffer to avoid extra copy.
*/ */
if (tif->tif_rawcp != buf) if (tif->tif_rawcp != buf)
_TIFFmemcpy(buf, tif->tif_rawcp, cc); _TIFFmemcpy(buf, tif->tif_rawcp, cc);
tif->tif_rawcp += cc; tif->tif_rawcp += cc;
tif->tif_rawcc -= cc; tif->tif_rawcc -= cc;
return (1); return (1);
} }
/* /*
...@@ -112,9 +112,9 @@ DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) ...@@ -112,9 +112,9 @@ DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
static int static int
DumpModeSeek(TIFF* tif, uint32 nrows) DumpModeSeek(TIFF* tif, uint32 nrows)
{ {
tif->tif_rawcp += nrows * tif->tif_scanlinesize; tif->tif_rawcp += nrows * tif->tif_scanlinesize;
tif->tif_rawcc -= nrows * tif->tif_scanlinesize; tif->tif_rawcc -= nrows * tif->tif_scanlinesize;
return (1); return (1);
} }
/* /*
...@@ -123,16 +123,16 @@ DumpModeSeek(TIFF* tif, uint32 nrows) ...@@ -123,16 +123,16 @@ DumpModeSeek(TIFF* tif, uint32 nrows)
int int
TIFFInitDumpMode(TIFF* tif, int scheme) TIFFInitDumpMode(TIFF* tif, int scheme)
{ {
(void) scheme; (void) scheme;
tif->tif_fixuptags = DumpFixupTags; tif->tif_fixuptags = DumpFixupTags;
tif->tif_decoderow = DumpModeDecode; tif->tif_decoderow = DumpModeDecode;
tif->tif_decodestrip = DumpModeDecode; tif->tif_decodestrip = DumpModeDecode;
tif->tif_decodetile = DumpModeDecode; tif->tif_decodetile = DumpModeDecode;
tif->tif_encoderow = DumpModeEncode; tif->tif_encoderow = DumpModeEncode;
tif->tif_encodestrip = DumpModeEncode; tif->tif_encodestrip = DumpModeEncode;
tif->tif_encodetile = DumpModeEncode; tif->tif_encodetile = DumpModeEncode;
tif->tif_seek = DumpModeSeek; tif->tif_seek = DumpModeSeek;
return (1); return (1);
} }
/* /*
* Local Variables: * Local Variables:
......
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_error.c,v 1.5 2010-03-10 18:56:48 bfriesen Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_error.c,v 1.6 2017-07-04 12:54:42 erouault Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc. * Copyright (c) 1991-1997 Silicon Graphics, Inc.
* *
* Permission to use, copy, modify, distribute, and sell this software and * Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided * its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in * that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of * all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or * Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written * publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics. * permission of Sam Leffler and Silicon Graphics.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
...@@ -34,41 +34,49 @@ TIFFErrorHandlerExt _TIFFerrorHandlerExt = NULL; ...@@ -34,41 +34,49 @@ TIFFErrorHandlerExt _TIFFerrorHandlerExt = NULL;
TIFFErrorHandler TIFFErrorHandler
TIFFSetErrorHandler(TIFFErrorHandler handler) TIFFSetErrorHandler(TIFFErrorHandler handler)
{ {
TIFFErrorHandler prev = _TIFFerrorHandler; TIFFErrorHandler prev = _TIFFerrorHandler;
_TIFFerrorHandler = handler; _TIFFerrorHandler = handler;
return (prev); return (prev);
} }
TIFFErrorHandlerExt TIFFErrorHandlerExt
TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler) TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler)
{ {
TIFFErrorHandlerExt prev = _TIFFerrorHandlerExt; TIFFErrorHandlerExt prev = _TIFFerrorHandlerExt;
_TIFFerrorHandlerExt = handler; _TIFFerrorHandlerExt = handler;
return (prev); return (prev);
} }
void void
TIFFError(const char* module, const char* fmt, ...) TIFFError(const char* module, const char* fmt, ...)
{ {
va_list ap; va_list ap;
va_start(ap, fmt); if (_TIFFerrorHandler) {
if (_TIFFerrorHandler) va_start(ap, fmt);
(*_TIFFerrorHandler)(module, fmt, ap); (*_TIFFerrorHandler)(module, fmt, ap);
if (_TIFFerrorHandlerExt) va_end(ap);
(*_TIFFerrorHandlerExt)(0, module, fmt, ap); }
va_end(ap); if (_TIFFerrorHandlerExt) {
va_start(ap, fmt);
(*_TIFFerrorHandlerExt)(0, module, fmt, ap);
va_end(ap);
}
} }
void void
TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...) TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...)
{ {
va_list ap; va_list ap;
va_start(ap, fmt); if (_TIFFerrorHandler) {
if (_TIFFerrorHandler) va_start(ap, fmt);
(*_TIFFerrorHandler)(module, fmt, ap); (*_TIFFerrorHandler)(module, fmt, ap);
if (_TIFFerrorHandlerExt) va_end(ap);
(*_TIFFerrorHandlerExt)(fd, module, fmt, ap); }
va_end(ap); if (_TIFFerrorHandlerExt) {
va_start(ap, fmt);
(*_TIFFerrorHandlerExt)(fd, module, fmt, ap);
va_end(ap);
}
} }
/* /*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#if defined(JPEG_DUAL_MODE_8_12) #if defined(JPEG_DUAL_MODE_8_12)
# define TIFFInitJPEG TIFFInitJPEG_12 # define TIFFInitJPEG TIFFInitJPEG_12
# define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12
int
TIFFInitJPEG_12(TIFF* tif, int scheme);
# include LIBJPEG_12_PATH # include LIBJPEG_12_PATH
...@@ -40,7 +44,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ) ...@@ -40,7 +44,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode )
tif->tif_postencode = JPEGPostEncode; tif->tif_postencode = JPEGPostEncode;
tif->tif_encoderow = JPEGEncode; tif->tif_encoderow = JPEGEncode;
tif->tif_encodestrip = JPEGEncode; tif->tif_encodestrip = JPEGEncode;
tif->tif_encodetile = JPEGEncode; tif->tif_encodetile = JPEGEncode;
tif->tif_cleanup = JPEGCleanup; tif->tif_cleanup = JPEGCleanup;
tif->tif_defstripsize = JPEGDefaultStripSize; tif->tif_defstripsize = JPEGDefaultStripSize;
tif->tif_deftilesize = JPEGDefaultTileSize; tif->tif_deftilesize = JPEGDefaultTileSize;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $Id: tif_predict.h,v 1.8 2010-03-10 18:56:49 bfriesen Exp $ */ /* $Id: tif_predict.h,v 1.9 2016-10-31 17:24:26 erouault Exp $ */
/* /*
* Copyright (c) 1995-1997 Sam Leffler * Copyright (c) 1995-1997 Sam Leffler
...@@ -30,31 +30,33 @@ ...@@ -30,31 +30,33 @@
* ``Library-private'' Support for the Predictor Tag * ``Library-private'' Support for the Predictor Tag
*/ */
typedef int (*TIFFEncodeDecodeMethod)(TIFF* tif, uint8* buf, tmsize_t size);
/* /*
* Codecs that want to support the Predictor tag must place * Codecs that want to support the Predictor tag must place
* this structure first in their private state block so that * this structure first in their private state block so that
* the predictor code can cast tif_data to find its state. * the predictor code can cast tif_data to find its state.
*/ */
typedef struct { typedef struct {
int predictor; /* predictor tag value */ int predictor; /* predictor tag value */
tmsize_t stride; /* sample stride over data */ tmsize_t stride; /* sample stride over data */
tmsize_t rowsize; /* tile/strip row size */ tmsize_t rowsize; /* tile/strip row size */
TIFFCodeMethod encoderow; /* parent codec encode/decode row */ TIFFCodeMethod encoderow; /* parent codec encode/decode row */
TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */ TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */
TIFFCodeMethod encodetile; /* parent codec encode/decode tile */ TIFFCodeMethod encodetile; /* parent codec encode/decode tile */
TIFFPostMethod encodepfunc; /* horizontal differencer */ TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */
TIFFCodeMethod decoderow; /* parent codec encode/decode row */ TIFFCodeMethod decoderow; /* parent codec encode/decode row */
TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */ TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */
TIFFCodeMethod decodetile; /* parent codec encode/decode tile */ TIFFCodeMethod decodetile; /* parent codec encode/decode tile */
TIFFPostMethod decodepfunc; /* horizontal accumulator */ TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */
TIFFVGetMethod vgetparent; /* super-class method */ TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */ TIFFVSetMethod vsetparent; /* super-class method */
TIFFPrintMethod printdir; /* super-class method */ TIFFPrintMethod printdir; /* super-class method */
TIFFBoolMethod setupdecode; /* super-class method */ TIFFBoolMethod setupdecode; /* super-class method */
TIFFBoolMethod setupencode; /* super-class method */ TIFFBoolMethod setupencode; /* super-class method */
} TIFFPredictorState; } TIFFPredictorState;
#if defined(__cplusplus) #if defined(__cplusplus)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -4,23 +4,23 @@ ...@@ -4,23 +4,23 @@
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc. * Copyright (c) 1991-1997 Silicon Graphics, Inc.
* *
* Permission to use, copy, modify, distribute, and sell this software and * Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided * its documentation for any purpose is hereby granted without fee, provided
* that (i) the above copyright notices and this permission notice appear in * that (i) the above copyright notices and this permission notice appear in
* all copies of the software and related documentation, and (ii) the names of * all copies of the software and related documentation, and (ii) the names of
* Sam Leffler and Silicon Graphics may not be used in any advertising or * Sam Leffler and Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written * publicity relating to the software without the specific, prior written
* permission of Sam Leffler and Silicon Graphics. * permission of Sam Leffler and Silicon Graphics.
* *
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* *
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment