AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.09.04 13:15 "Trouble setting BitsPerSample to 8", by Brian Stains
2002.09.04 13:42 "RE: Trouble setting BitsPerSample to 8", by Rainer Wiesenfarth
2002.09.04 13:49 "RE: Trouble setting BitsPerSample to 8", by Brian Stains
2002.09.04 23:44 "Re: Trouble setting BitsPerSample to 8", by Peter Skarpetis

2002.09.04 23:44 "Re: Trouble setting BitsPerSample to 8", by Peter Skarpetis

This is the order I set them in and it works fine.

  TIFFSetField(ti->tiff, TIFFTAG_IMAGEWIDTH, (uint32)driver->width);
   TIFFSetField(ti->tiff, TIFFTAG_IMAGELENGTH, (uint32)driver->height);
   TIFFSetField(ti->tiff, TIFFTAG_XRESOLUTION, (float)driver->wres);
   TIFFSetField(ti->tiff, TIFFTAG_YRESOLUTION, (float)driver->hres);
   TIFFSetField(ti->tiff, TIFFTAG_COMPRESSION, compression);
   TIFFSetField(ti->tiff, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
   TIFFSetField(ti->tiff, TIFFTAG_MINSAMPLEVALUE, (short)0);
   TIFFSetField(ti->tiff, TIFFTAG_MAXSAMPLEVALUE, (short) 255);
   TIFFSetField(ti->tiff, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
   TIFFSetField(ti->tiff, TIFFTAG_ROWSPERSTRIP, 1L);
   TIFFSetField(ti->tiff, TIFFTAG_BITSPERSAMPLE, 8);
   TIFFSetField(ti->tiff, TIFFTAG_IMAGEDESCRIPTION, driver->ssjob->name);
   TIFFSetField(ti->tiff, TIFFTAG_DOCUMENTNAME, driver->ssjob->name);
   TIFFSetField(ti->tiff, TIFFTAG_ARTIST, progname);
   TIFFSetField(ti->tiff, TIFFTAG_SAMPLESPERPIXEL, 3);
   TIFFSetField(ti->tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);

Peter Skarpetis
Serendipity Software Pty Ltd
67 Fitzroy Street
Surry Hills NSW 2010
Sydney Australia

Phone: +612 93321788
Fax: +612 93321766
email: peters@serendipity-software.com.au
WWW: http://www.riponce.com