[Gdal-dev] Is their a way to convert just the pure black pixels (0, 0, 0) around the interior of a tile to 0, 0, 1?

John Mitchell mitchelljj98 at gmail.com
Sun May 6 07:49:36 EDT 2007


Hi,

Is their a way to convert just the pure black pixels (0,0,0) around the
interior of a tile to 0,0,1?

I believe the solution is to first convert all the pure black pixels(0,0,0)
within a tile to 0,0,1 by remapping within gdalwarp

-srcnodata 0,0,0 -dstnodata 0,0,1

and then run nearblack to convert all the 0,0,1 values around the collar
back to pure black.  That way the interior black values stay at 0,0,1 so
later when the tiles are mocaicked via gdalwarp the only pixels that are
0,0,0 are around the collars of the tiles and the void/empty areas that the
mosaics creates, which can made invisible within mapserver via offsite
0,0,0.

Does this make sense and if all I want to do is convert the 0,0,1 values to
0,0,0 within near black then should I make the near black parameter (-near
1) instead of the default of value of 15?

Thanks,**

-- 
John J. Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070506/0f0438cd/attachment.html


More information about the Gdal-dev mailing list