[Gdal-dev] gdal_merge.py and 24 bit images with black border

Frank Warmerdam warmerdam at pobox.com
Thu Jan 12 20:57:05 EST 2006


On 1/12/06, Vojtech Honzik <v.honzik at gmail.com> wrote:
> Would you give me a hint how to utilize fourth (alpha) band to make RGB 24
> bit mosaic? The only hint I got was to use switch -n for no data.
> Unfortunately there is no way how to set a triplet RGB as a parameter. As
> being novice to Python as well as GDAL API, I would like to ask you for hint
> how to make transparent cells with the values 0 0 0 (black) from input.
> I have found a script rgbmask.py that adds fourth channel with the values 0
> and 255, but I don't know how to handle with this channel.
> Thank you for your hints.

Vojtech,

I am not familiar with rgbmask.py.  But if it creates an alpha
channel, then you should be able to use gdalwarp normally and
it will honour the alpha channel - assuming it is properly marked
as an alpha channel.  After running rgbmask.py what does gdalinfo
report for your file?

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list