I'm algorithmically building a QImage at double resolution, and I want 
to build a retina-capable QPixmap from it.

Say for instance I want to make a retina-capable image at 100x100 
logical pixels. So I create a QImage at 200x200, draw some stuff into, 
then I want to convert it to a QPixmap at 100x100 with a 
devicePixelRatio of 2.

Doing this...

   QImage image(200, 200, ...)
   // draw into image
   image.setDevicePixelRatio(2.0f);
   QPixmap pixmap = QPixmap::fromImage(image);

...doesn't seem to yield the proper image.

Is that all that is necessary, or did I miss a step?
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to