PyQGIS: Render (Print/Save) a Layer as an Image
This tutorial will teach you how to render (print or save) a QGIS layer as an image using the PyQGIS Python API. Automating layer rendering can be very useful to create and save visualizations that have consistent styling, extent and format. The first thing you need to do is create a QImage. Here we create…