Saturday, February 13, 2010
QPixmap, QBitmap and QImage
QPixmap is not the only image class PyQt offers: there's also QBitmap, which is just like QPixmap, but for black and white images only, and QImage. Where QPixmap and QBitmap are optimized for drawing (and then showing on screen or on a printer), QImage is optimized for reading and writing (together with the QImageIO class), and for manipulating the actual pixels of an image. There's another image-related class, QPicture, which can be used to record drawing operations and replay them later. The recorded paint events can then be stored in a file and reloaded later on. Those files are called meta-files — but they're in a special Qt format. In Qt 3, QPicture also supports the standard scalable vector graphics format, svg. If you want to create a complex vector-drawing application you'd be well advised to stick to this standard.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment