[Gdal-dev] libtiff for Mac?

Eric Dönges eric.doenges at gmx.net
Thu Nov 15 05:15:34 EST 2007


Am 15.11.2007 um 00:24 schrieb Alison Luo:

> Is there a libtiff for Mac platform?

libtiff should compile for MacOS without any problems.

>  I need to call XTIFFOpenW equivalent on Mac, but this function is  
> WIN32 specific.

I assume XTIFFOpenW takes an 16 bit Unicode string as input ? If this  
is the case,
on MacOS you could create a CFString with either  
CFStringCreateWithCharacters() or
CFStringCreateWithCharactersNoCopy(), use that string to create a  
CFURL using CFURLCreateWithString(), and then call  
CFURLGetFileSystemRepresentation() to get
the path in the proper encoding (which is UTF-8 on MacOS, I believe).  
To avoid all
this pain, you should check if you can change your code to only use  
UTF-8 for filenames.

Disclaimer: I only assume the above will work; I haven't tested it  
myself.

With kind regards,
Eric



More information about the gdal-dev mailing list