fix printdir chaining for some codecs. (#2020)
This commit is contained in:
parent
e76cfb0205
commit
35128920f8
@ -1,3 +1,8 @@
|
||||
2009-03-12 Frank Warmerdam <warmerdam@pobox.com>
|
||||
|
||||
* libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining
|
||||
for some codecs (#2020).
|
||||
|
||||
2009-02-12 Frank Warmerdam <warmerdam@pobox.com>
|
||||
|
||||
* libtiff/tif_luv.c: Fix handling of tiled logluv images.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_fax3.c,v 1.66 2008-12-31 23:48:02 bfriesen Exp $ */
|
||||
/* $Id: tif_fax3.c,v 1.67 2009-03-13 02:02:51 fwarmerdam Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990-1997 Sam Leffler
|
||||
@ -1256,6 +1256,8 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
|
||||
if (TIFFFieldSet(tif,FIELD_BADFAXRUN))
|
||||
fprintf(fd, " Consecutive Bad Fax Lines: %lu\n",
|
||||
(unsigned long) sp->badfaxrun);
|
||||
if (sp->printdir)
|
||||
(*sp->printdir)(tif, fd, flags);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_jpeg.c,v 1.79 2008-12-21 21:07:05 fwarmerdam Exp $ */
|
||||
/* $Id: tif_jpeg.c,v 1.80 2009-03-13 02:02:51 fwarmerdam Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1997 Sam Leffler
|
||||
@ -2009,6 +2009,8 @@ JPEGPrintDir(TIFF* tif, FILE* fd, long flags)
|
||||
if (TIFFFieldSet(tif,FIELD_JPEGTABLES))
|
||||
fprintf(fd, " JPEG Tables: (%lu bytes)\n",
|
||||
(unsigned long) sp->jpegtables_length);
|
||||
if (sp->printdir)
|
||||
(*sp->printdir)(tif, fd, flags);
|
||||
}
|
||||
|
||||
static uint32
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_ojpeg.c,v 1.43 2008-12-30 01:36:26 bfriesen Exp $ */
|
||||
/* $Id: tif_ojpeg.c,v 1.44 2009-03-13 02:02:51 fwarmerdam Exp $ */
|
||||
|
||||
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
|
||||
specification is now totally obsolete and deprecated for new applications and
|
||||
@ -237,6 +237,7 @@ typedef struct {
|
||||
#endif
|
||||
TIFFVGetMethod vgetparent;
|
||||
TIFFVSetMethod vsetparent;
|
||||
TIFFPrintMethod printdir;
|
||||
uint64 file_size;
|
||||
uint32 image_width;
|
||||
uint32 image_length;
|
||||
@ -453,6 +454,7 @@ TIFFInitOJPEG(TIFF* tif, int scheme)
|
||||
tif->tif_tagmethods.vgetfield=OJPEGVGetField;
|
||||
sp->vsetparent=tif->tif_tagmethods.vsetfield;
|
||||
tif->tif_tagmethods.vsetfield=OJPEGVSetField;
|
||||
sp->printdir=tif->tif_tagmethods.printdir;
|
||||
tif->tif_tagmethods.printdir=OJPEGPrintDir;
|
||||
/* Some OJPEG files don't have strip or tile offsets or bytecounts tags.
|
||||
Some others do, but have totally meaningless or corrupt values
|
||||
@ -624,6 +626,8 @@ OJPEGPrintDir(TIFF* tif, FILE* fd, long flags)
|
||||
fprintf(fd," JpegProc: %u\n",(unsigned int)sp->jpeg_proc);
|
||||
if (TIFFFieldSet(tif,FIELD_OJPEG_JPEGRESTARTINTERVAL))
|
||||
fprintf(fd," JpegRestartInterval: %u\n",(unsigned int)sp->restart_interval);
|
||||
if (sp->printdir)
|
||||
(*sp->printdir)(tif, fd, flags);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -917,6 +921,7 @@ OJPEGCleanup(TIFF* tif)
|
||||
{
|
||||
tif->tif_tagmethods.vgetfield=sp->vgetparent;
|
||||
tif->tif_tagmethods.vsetfield=sp->vsetparent;
|
||||
tif->tif_tagmethods.printdir=sp->printdir;
|
||||
if (sp->qtable[0]!=0)
|
||||
_TIFFfree(sp->qtable[0]);
|
||||
if (sp->qtable[1]!=0)
|
||||
|
Loading…
Reference in New Issue
Block a user