On Fri, Oct 7, 2011 at 12:05 PM, Rhys A.D. Stewart <[email protected]> wrote: > Greetings, > > hoping for a quick answer before i go diving through the API. is there > a quick way to invoke the save as image dialogue from the console? o > have a list of coordinates and would like to zoom in and get an image > of each area around the coords? But since i have about 250 or so > coords am not too keen on doing it manually.......so then i really > dont want the save as image box to come up really i want the > functionality from the console.
You can directly use QgsMapRenderer class to render the map to whatever target - in your case it would be a QImage that you can save to a file. PyQGIS cookbook gives an example how to construct and use map renderer. If you are going to use map canvas contents you may take advantage of map renderer from map canvas ( qgis.utils.iface.mapCanvas().mapRenderer() ) and only change extents and trigger the rendering. [1] http://www.qgis.org/pyqgis-cookbook/composer.html Martin _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
