AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.09.01 11:49 "[Tiff] Reading and writing to memory.", by =?iso-8859-15?B?VuRpbvYgSuRydmVs5A==?=
2003.09.01 19:17 "[Tiff] Reading and writing to memory.", by Pushkar Pradhan
2003.09.02 05:43 "[Tiff] Reading and writing to memory.", by =?iso-8859-15?B?VuRpbvYgSuRydmVs5A==?=
2003.09.01 20:02 "[Tiff] Reading and writing to memory.", by Frank Warmerdam
2003.09.02 05:46 "[Tiff] Reading and writing to memory.", by =?iso-8859-15?B?VuRpbvYgSuRydmVs5A==?=
2003.09.02 10:13 "[Tiff] Reading and writing to memory.", by =?iso-8859-15?B?VuRpbvYgSuRydmVs5A==?=

2003.09.02 10:13 "[Tiff] Reading and writing to memory.", by =?iso-8859-15?B?VuRpbvYgSuRydmVs5A==?=

On Mon, Sep 01, 2003 at 16:02:30 -0400, Frank Warmerdam wrote:

V�in� J�rvel� wrote:

Tiff = TIFFClientOpen( "dummy", "w", (thandle_t) &mt, tiffMemReadProc, tiffMemWriteProc, tiffMemSeekProc, tiffMemCloseProc, tiffMemSizeProc, NULL, NULL );

It fails by saying: "dummy: Not a TIFF file, bad magic number 0 (0x0)."

I am not absolutely certain why you are getting the "dummy: Not a TIFF file, bad magic number" message. It may be that as currently setup even a writable data stream needs to support read, and that you are not allowing the tiff header to be read back by the code.

The problem was that the buffer where i was writing to was already allocated, and that is why it tried to read the headers from it. And i hadn't implemented extending the memory because i thought that allocating it to the size of the image by myself was enough.. stupid me.. it needs to write headers in to it too, and it's going to be compressed.

Thanks for guiding the way to the solution.

>
> Best regards,
>
> --

> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam@pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent

>
>

--
V�in� J�rvel�