[Qgis-developer] How to use QPixmap argument in saveAsImage()

Echavarria Gregory, Maria Angelica m.echavarriagregory at umiami.edu
Mon Jan 25 18:02:14 EST 2010


Dear Devs:

I am currently using self.canvas.saveAsImage ( FileName,  QPixmap=0,  QString="PNG" ) with only the first argument, the second and third are therefore using default settings. My Qgis version is OSGeo4W Kore 1.0, along with Python2.5.  I have tried many ways of using QPixmap following the API, with no success. I need to set up the resolution of my saved image (int width, int height, depth, ... or dpi if that option alone exists.) Currently, my images are being saved by default at 96 dpi which is very low for my purpose. Please, how are the syntax for using the second argument QPixmap? or... should I define QPixmap before and just call it in the method? how? please give me some exemplified advice.

Thanks,
Angelica.



More information about the Qgis-developer mailing list