I need to fade/blend the edges of a series of aerial images with gdal. The closest thing that I've been able to accomplish is using the -cutline and -cblend switches of gdalwarp to get the edges to fade based on the cutline mask.. which sounds good until you actually do it. I'm having issues because I'm using the outline of each image for the cutline mask which was generated by gdaltindex for each image.

I've found that the the blend function of gdalwarp operates 50/50 inside and outside of the cutline mask, instead of what I need of it being 100% on the inside. Or to be able to generate a polygon to use as a mask similar to my index polygon but smaller than the actual extents of the image to compensate for the 50/50 - inside/outside fading of the blend function.

I've also considered using imagemagick but I'm not familiar with it at all and am having trouble understanding the examples that I find on the web. I'm also concerned about it retaining georeferencing data .

1 Answer 1


I've made a script for QGIS that should be able to do what you're after


Here you can specify a pixel distance to fade the tif by

Once you've done that you can mosaic a bunch of these tifs with FME or by looking at Can I preserve a fading alpha layer when mosaicing images with gdal?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.