| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2009.12.07 16:06 "Problems with multiple strip G4 to single strip G4 tiff.", by Phillip WilesIf I use this below to write a tiff that started as single strip tiff, there
is no problem. But when I try to write an image that started out
as multiple strips it crashes. Do I "need" to save the image multiple
strips? And if I do, can someone help in the right direction (I have
experimented to try and force multiple strips with a group 4 image, with no
luck).
TIFFSetField(out,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG);
if(mbCompression){TIFFSetField(tif, TIFFTAG_COMPRESSION,
mTiffCompression);};
if(mbSubfileType){TIFFSetField(tif, TIFFTAG_SUBFILETYPE, muliSubfileType);};
if(mbResolutionUnit){TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT,
musiResolutionUnit);};
if(mbXResolution){TIFFSetField(tif, TIFFTAG_XRESOLUTION,
mfTiffXresolution);};
if(mbYResolution){TIFFSetField(tif, TIFFTAG_YRESOLUTION,
mfTiffYresolution);};
if(mbImageWidth){TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, muliImageWidth);};
if(mbImageLength){TIFFSetField(tif, TIFFTAG_IMAGELENGTH, muliImageHeight);};
if(mbPhotometricInterpretation){TIFFSetField(tif, TIFFTAG_PHOTOMETRIC
,musiPhotoMetric);};
if(mbBitsPerSample){TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE
,musiBitPerSample);};
if(mbFillOrder){TIFFSetField(tif, TIFFTAG_FILLORDER, musiFillOrder);};
if(mbSamplesPerPixel){TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL,
musiSamplePerPixel);};
if(mbuf){TIFFWriteEncodedStrip(tif, 0, mbuf, (muliImageWidth *
muliImageHeight) / 8);};
//My attempt at creating multiple strip.
//if(mbRowsPerStrip){TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,
muliRowsPerStrip);};
//tdata_t outbuf;
//char * p = (char*)mbuf;
//for(tstrip_t counter = 0; counter < mstrip; counter++){
// outbuf = (void*)&p[counter * (muliImageWidth * muliRowsPerStrip)/8];
// TIFFWriteEncodedStrip(out, counter, outbuf, (muliImageWidth *
muliRowsPerStrip)/8);
//};
|
|||||||