AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

2002.09.05 09:00 "Write CMYK Tiff file", by storein

HI everybody,

I have read CMYK tiff file by

           for (strip=0;strip<TIFFNumberOfStrips(tif);strip++)
                  TIFFReadEncodedStrip(tif,strip,buf,(tsize_t)-1);

Then I changed some bitS of buf ,Now I want to save the buf to tiff file.

Because I only changed image data, No any other else is changed. I use sentense

           TIFF* Writetif = TIFFOpen("C:\\111.tif", "w");
               for (strip=0;strip<1;strip++)
                   TIFFWriteEncodedStrip(Writetif,strip,bits,height*width);
           TIFFClose (Writetif);

for saving file.

but it is error.

     // height and widht is I have read from 111.tif file ,
     // the strips of 111.tif file is 1
     // 111.tif is CMYK tiff file ,the size is 2X10

Do you know correctly method? please help me

thank you very much!

        storein
        storein@sina.com
          2002-09-05