AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.09.01 05:23 "[Tiff] DPI setting", by Poom
2004.09.01 08:50 "RE: [Tiff] DPI setting", by Patrick Harris
2004.09.01 08:59 "Re: [Tiff] DPI setting", by Poom
2004.09.01 17:08 "Re: [Tiff] DPI setting", by Andrey Kiselev
2004.09.01 13:55 "Re: [Tiff] DPI setting", by Frank Warmerdam

2004.09.01 05:23 "[Tiff] DPI setting", by Poom

Hi,

Now I can generate TIFF file .However,when I check my tiff file with photoshop,my picture's DPI value is strange!

On setting tag ,I setted like this.

   TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, imageW);
   TIFFSetField(tif, TIFFTAG_IMAGELENGTH, imageH);
   TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8,8,8);
   TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3);
   int rowperstrip =TIFFDefaultStripSize(tif, imageW*3);
   TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowperstrip);

   TIFFSetField(tif, TIFFTAG_COMPRESSION, 1);
   TIFFSetField(tif, TIFFTAG_PHOTOMETRIC,PHOTOMETRIC_RGB);

   TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
    
   TIFFSetField(tif, TIFFTAG_XRESOLUTION,300);
   TIFFSetField(tif, TIFFTAG_YRESOLUTION,300);
  TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);

But resulted TIFF file 's DPI was 72. I try to correct this problem but now I can't found the way.

Please tell me the right way to solve it.
Thank you so much

poom