Logo Search packages:      
Sourcecode: qt4-x11 version File versions

src.gui.image.qimagewriter.cpp

//! [0]
        QImageWriter writer;
        writer.setFormat("png"); // same as writer.setFormat("PNG");
//! [0]


//! [1]
        QImage image("some/image.jpeg");
        QImageWriter writer("images/outimage.png", "png");
        writer.setText("Author", "John Smith");
        writer.write(image);
//! [1]


//! [2]
        QImageWriter writer(fileName);
        if (writer.supportsOption(QImageIOHandler::Description))
            writer.setText("Author", "John Smith");
//! [2]



Generated by  Doxygen 1.6.0   Back to index