AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.04.26 15:07 "[Tiff] Floating points to TIFF", by GUENDE
2005.04.26 15:41 "Re: [Tiff] Floating points to TIFF", by Joris
2005.04.27 07:20 "Re: [Tiff] Floating points to TIFF", by GUENDE
2005.04.26 21:20 "Re: [Tiff] Floating points to TIFF", by Andrey Kiselev
2005.04.29 20:32 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Bill Bither
2005.04.29 19:44 "[Tiff] Adobe Photoshop Corrupt TIFF", by Bill Bither
2005.04.29 20:37 "Re: [Tiff] Adobe Photoshop Corrupt TIFF", by Chris Cox
2005.04.29 20:02 "Re: [Tiff] Adobe Photoshop Corrupt TIFF", by Andrey Kiselev
2005.04.29 20:48 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Chris Cox
2005.04.29 21:53 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Bill Bither
2005.04.29 22:34 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Chris Cox
2005.04.30 13:31 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Bill Bither
2005.05.01 17:55 "RE: [Tiff] Adobe Photoshop Corrupt TIFF", by Chris Cox
2005.04.30 19:07 "Re: [Tiff] Adobe Photoshop Corrupt TIFF", by Andrey Kiselev

2005.04.27 07:20 "Re: [Tiff] Floating points to TIFF", by GUENDE

Hi!

Thank you very much Joris, i was turning in a round, and as i thought, it was just a bug: i have forgotten *4...

So it is
     TIFFWriteRawStrip(filout, i, raster2, width*4);
instead of
     TIFFWriteRawStrip(filout, i, raster2, width);

And Andrey, i should use this software, but this utility is a subject of studies for myself so i have to code it ^_^ (it is a part of a soft to convert generated DEM to Geotiff)

But thank you too.

Bests regards,

Bastien

Joris <joris.at.lebbeke@skynet.be>:

Bastien,

but i get 1byte data in output instead of 4bytes!!!

TIFFWriteRawStrip(filout, i, raster2, width);

That should be width*4, for your purposes. See http://www.remotesensing.org/libtiff/man/TIFFWriteRawStrip.3tiff.html, it explains that the last parameter is supposed to be the 'bytes of raw data', as opposed to the samples contained therein.

Also, usually, you'll want to use TIFFWriteEncodedStrip, http://www.remotesensing.org/libtiff/man/TIFFWriteEncodedStrip.3tiff.html, rather then TIFFWriteRawStrip, though I'm not completely sure in this case...