[FWTools] Converting a black border to transparent in geotifs

Frank Warmerdam warmerdam at pobox.com
Mon Feb 12 09:15:45 EST 2007


Kevin Flanders wrote:
> Frank,
> 
> Does this "no data" work with ecw files in MapServer?  If so, how would the
> mapfile look?  I cannot find any details on the website.  I have ecw's with
> white space that I wish to make transparent.

Kevin,

The mechanism is the OFFSITE directive.

eg.
    OFFSIZE 255 255 255

in your LAYER definition.  *But* with ECW (or any other lossily
compressed format) you will generally find that some of the white pixels
are actually just nearly white.  These will not be recognised as nodata
by mapserver since they don't exactly match the offsite value.

This is the problem the nearblack utility is designed to resolve though the
price is that it produces uncompressed files after the fixup.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list