1

Currently using QGIS 2.18.24, but tested this on 2.14.18 as well.

I'm trying to load a QML file for a raster with a specific blending mode ('multiply'), however QGIS only applies it until I click 'Apply' or 'Okay', after which point it resets back to 'normal'.

I have also tested out the QgsRasterLayer().setBlendMode(6) within python, to no avail.

Is this a known bug, or am I just doing something incorrectly?

Edit: Here is some sample code:

# Apply style layer and set blending mode

layer = QgsRasterLayer(lr)
QgsMapLayerRegistry.instance().addMapLayer(layer)
layer.loadNamedStyle("Path\To\Style.qml")
layer.setBlendMode(6)
layer.triggerRepaint()
1
  • The issue seemed to be that I was saving out the final map as a PDF, which didn't honor the blending. It works when saving out as a TIF
    – GIS_Canuck
    Oct 22, 2018 at 23:11

1 Answer 1

1

The issue seemed to be that I was saving out the final map as a PDF, which didn't honor the blending. It works when saving out as a TIF

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.