2002.02.03 05:00 "tiff (libtiff)", by Harring Figueiredo

2002.02.03 21:42 "Re: tiff (libtiff)", by Peter Montgomery


I would like to know how I can manipulate a TIFF image that is already in memory ( I am receiving the image through the network ).

From what I can see in Libtiff, we can only get a handle to a Tiff by opening a file.

Just curious, are you receiving the file directly over a socket? My confusion stems from the fact that if you have a harddrive on a network and the drive is mapped to the local machine, then the library works like it always does. A network drive behaves no different from a local drive since the OS hides the magic ju-ju needed and presents a normal file handle.

Of course, if you are directly hooking up to a machine via a socket and squirting bits down the pipe, then that's a different story. The simplest solution in that case is to simply write the incoming data to disk as a temporary file and then handle it as usual. The drawback is that you have the added overhead of reading the image twice. This could be substantial depending on the image size.

I'm not sure of the best way to directly handle an image in memory, but perhaps letting the list know what platform you're working on may be of benefit to finding a solution.