Hi there!
I'd like to get the data of a QImage or a QPixmap
Any idea
Hi there!
I'd like to get the data of a QImage or a QPixmap
Any idea
What do you mean by data of image ?
QImage::bits ?
I mean the data that you can see when you open an image with notepad for example.
Maybe a buffer could help ?
Have a look at QImage::saveSo may be the bytearray ba might of use to youQt Code:
QImage image; QByteArray ba; image.save(&buffer, "PNG"); // writes image into ba in PNG formatTo copy to clipboard, switch view to plain text mode
Thank you that's a good step forward !
Now I can send the datas of an image to a browser.
However, the files (png) are still corrupted according to all my softwares (photoshop, paint, windows, ...)
Why is that ?
EDIT : I just found out ! In fact, I used utf8 instead of ISO 8859-1 for my QTextStream !
Thanks again aamer4yu !
Last edited by fitzy; 29th October 2009 at 15:53.
Bookmarks