[QGIS-Developer] Apply transparency on pixels in an image with PyQGIS

Herbert N'DZONDZI hndzondzi at gmail.com
Mon Jan 29 03:50:18 PST 2018


I'm trying to grab the pixels that intersect with my polygon shapefile and
apply transparency to them (that is, I'm trying to create a hole in my
raster)

For that, I get all the pixels that are in the footprint of the shapefile
in a list (see code below)

Then I used the QgsRasterTransparency.TransparentThreeValuePixel () class
to apply transparency, but I get an error message:

Error message: AttributeError: 'Dataset' object has no attribute 'renderer'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180129/859ab9d6/attachment.html>


More information about the QGIS-Developer mailing list