mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
don't try to use unsupported LZW, and remove compiler warnings
This commit is contained in:
parent
e55ff47bb0
commit
531131aca3
@ -43,7 +43,12 @@ static const int num_extensions_tiff = sizeof(extensions_tiff) / sizeof(const ch
|
|||||||
// output. See tiff.h or type man pnmtotiff for a better explanation
|
// output. See tiff.h or type man pnmtotiff for a better explanation
|
||||||
// of options.
|
// of options.
|
||||||
|
|
||||||
unsigned short tiff_compression = COMPRESSION_LZW;
|
//unsigned short tiff_compression = COMPRESSION_LZW; // lzw not supported anymore because of big bad Unisys
|
||||||
|
#ifdef COMPRESSION_DEFLATE
|
||||||
|
unsigned short tiff_compression = COMPRESSION_DEFLATE;
|
||||||
|
#else
|
||||||
|
unsigned short tiff_compression = COMPRESSION_NONE;
|
||||||
|
#endif
|
||||||
/* One of:
|
/* One of:
|
||||||
COMPRESSION_NONE
|
COMPRESSION_NONE
|
||||||
COMPRESSION_CCITTRLE
|
COMPRESSION_CCITTRLE
|
||||||
@ -315,7 +320,7 @@ PNMFileTypeTIFF::Reader::
|
|||||||
Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number) :
|
Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number) :
|
||||||
PNMReader(type, file, owns_file)
|
PNMReader(type, file, owns_file)
|
||||||
{
|
{
|
||||||
bool grayscale;
|
bool grayscale = false;
|
||||||
int numcolors;
|
int numcolors;
|
||||||
int i;
|
int i;
|
||||||
unsigned short* redcolormap;
|
unsigned short* redcolormap;
|
||||||
@ -649,7 +654,7 @@ Writer(PNMFileType *type, ostream *file, bool owns_file) :
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
int PNMFileTypeTIFF::Writer::
|
int PNMFileTypeTIFF::Writer::
|
||||||
write_data(xel *array, xelval *alpha) {
|
write_data(xel *array, xelval *alpha) {
|
||||||
colorhist_vector chv;
|
colorhist_vector chv = (colorhist_vector) 0;
|
||||||
colorhash_table cht;
|
colorhash_table cht;
|
||||||
unsigned short
|
unsigned short
|
||||||
red[TIFF_COLORMAP_MAXCOLORS],
|
red[TIFF_COLORMAP_MAXCOLORS],
|
||||||
@ -657,12 +662,12 @@ write_data(xel *array, xelval *alpha) {
|
|||||||
blu[TIFF_COLORMAP_MAXCOLORS];
|
blu[TIFF_COLORMAP_MAXCOLORS];
|
||||||
int row, colors, i;
|
int row, colors, i;
|
||||||
register int col;
|
register int col;
|
||||||
int grayscale;
|
int grayscale = false;
|
||||||
struct tiff * tif;
|
struct tiff * tif;
|
||||||
short photometric;
|
short photometric = 0;
|
||||||
short samplesperpixel;
|
short samplesperpixel = 0;
|
||||||
short bitspersample;
|
short bitspersample = 0;
|
||||||
int bytesperrow;
|
int bytesperrow = 0;
|
||||||
unsigned char* buf;
|
unsigned char* buf;
|
||||||
unsigned char* tP;
|
unsigned char* tP;
|
||||||
|
|
||||||
@ -735,6 +740,7 @@ write_data(xel *array, xelval *alpha) {
|
|||||||
samplesperpixel = 1;
|
samplesperpixel = 1;
|
||||||
bitspersample = pm_maxvaltobits( _maxval );
|
bitspersample = pm_maxvaltobits( _maxval );
|
||||||
photometric = PHOTOMETRIC_MINISBLACK;
|
photometric = PHOTOMETRIC_MINISBLACK;
|
||||||
|
i = 8 / bitspersample;
|
||||||
bytesperrow = ( _x_size + i - 1 ) / i;
|
bytesperrow = ( _x_size + i - 1 ) / i;
|
||||||
} else {
|
} else {
|
||||||
samplesperpixel = 1;
|
samplesperpixel = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user