I have a QGis project that I programmatically modify using the Python xml.etree library. Now, I would like to know if it is possible to add few lines to my script in order to export the modified project to a new jpg image. The python script should be run OUTSIDE the QGis python console. Thanks!
Asked
Active
Viewed 428 times
1
-
Export image from composer or data view? – artwork21 Aug 13 '14 at 17:13
-
Export from composer, with map, title, labels, tables, logos... thanks! – Andreampa Aug 13 '14 at 20:58
1 Answers
1
You may use the printPageAsRaster (int page) function from the QgsComposition class
print composer page to image If the image does not fit into memory, a null image is returned More...
This Q/A gives an example of it exporting to png (which you can change to jpg).
Programmatically load composer from template and generate atlas using pyQgis