AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.03.03 18:01 "TIFFClientOpen, libtiff 3.6.1, ignores 'm' option", by <d_sf@cox.net>
2004.03.03 18:08 "Re: TIFFClientOpen, libtiff 3.6.1, ignores 'm' option", by Bob Friesenhahn
2004.03.03 18:15 "Re: TIFFClientOpen, libtiff 3.6.1, ignores 'm' option", by Frank Warmerdam
2004.03.03 20:48 "Re: TIFFClientOpen, libtiff 3.6.1, ignores 'm' option", by Andrey Kiselev

2004.03.03 18:15 "Re: TIFFClientOpen, libtiff 3.6.1, ignores 'm' option", by Frank Warmerdam

dimitar wrote:
> Hi, 
>  
> I noticed that I can not open tiff files after I upgraded 
> from libtiff 3.5.7 to 3.6.1. 
> The reason is TIFFClientOpen. 
> In 3.6.1 there is check that all client supplied function 
> pointers are not null. However this is not enough. I am 
> supplying 'm' option, and passing null for the last two 
> parameters (for map and unmap) because I am not going to 
> use memory mapped files. 
> I think the correct way is to check for memory mapped file 
> related functions, only when 'm' option is not specified. 
>  
> Any comments would be appreciated. 

Dimitar,

Andrey may choose to change TIFFClientOpen(), but in the meantime
you can just provide "null operation" implementations of the map and
unmap procedures.

For example (from tif_msdos.c):

static int
_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
	return (0);
}

static void
_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
{
}

If we were going to relax the requirements on TIFFClientOpen(), then I
would suggest not looking for the 'm' switch, but instead just having
TIFFClientOpen() provide the above functions if the passed in function
pointers are NULL.

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