}
int
-TIFFSetCompressionScheme(TIFF* tif, int scheme)
+TIFFSetCompressionScheme(TIFF* tif, uint16 scheme)
{
const TIFFCodec *c = TIFFFindCODEC(scheme);
TIFFDirectory* td = &tif->tif_dir;
int status = 1;
uint32 v32;
+ uint16 v16;
int i, v;
double d;
char* s;
}
break;
case TIFFTAG_COMPRESSION:
- v = va_arg(ap, int) & 0xffff;
+ v16 = va_arg(ap, int) & 0xffff;
/*
* If we're changing the compression scheme,
* the notify the previous module so that it
* can cleanup any state it's setup.
*/
if (TIFFFieldSet(tif, FIELD_COMPRESSION)) {
- if (td->td_compression == v)
+ if (td->td_compression == v16)
break;
(*tif->tif_cleanup)(tif);
tif->tif_flags &= ~TIFF_CODERSETUP;
/*
* Setup new compression routine state.
*/
- if( (status = TIFFSetCompressionScheme(tif, v)) != 0 )
- td->td_compression = v;
+ if( (status = TIFFSetCompressionScheme(tif, v16)) != 0 )
+ td->td_compression = v16;
break;
case TIFFTAG_PHOTOMETRIC:
td->td_photometric = (uint16) va_arg(ap, int);
*/
TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
switch ((hs<<4)|vs) {
- case 0x44: return (putcontig8bitYCbCr44tile);
- case 0x42: return (putcontig8bitYCbCr42tile);
- case 0x41: return (putcontig8bitYCbCr41tile);
- case 0x22: return (putcontig8bitYCbCr22tile);
- case 0x21: return (putcontig8bitYCbCr21tile);
- case 0x11: return (putcontig8bitYCbCr11tile);
+ case 0x44: return (&putcontig8bitYCbCr44tile);
+ case 0x42: return (&putcontig8bitYCbCr42tile);
+ case 0x41: return (&putcontig8bitYCbCr41tile);
+ case 0x22: return (&putcontig8bitYCbCr22tile);
+ case 0x21: return (&putcontig8bitYCbCr21tile);
+ case 0x11: return (&putcontig8bitYCbCr11tile);
}
return (NULL);
}
extern int TIFFFlushData1(TIFF*);
extern void TIFFFreeDirectory(TIFF*);
extern int TIFFDefaultDirectory(TIFF*);
-extern int TIFFSetCompressionScheme(TIFF*, int);
+extern int TIFFSetCompressionScheme(TIFF*, uint16);
extern int TIFFSetDefaultCompressionState(TIFF*);
extern uint32 _TIFFDefaultStripSize(TIFF*, uint32);
extern void _TIFFDefaultTileSize(TIFF*, uint32*, uint32*);