Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
02-12-2014 05:50 AM
use the save method.
example from http://qt-project.org/doc/qt-4.8/qimage.html#save-
QImage image; QByteArray ba; QBuffer buffer(&ba); buffer.open(QIODevice::WriteOnly); image.save(&buffer, "PNG"); // writes image into ba in PNG format
02-12-2014 05:50 AM
There are a few methods this link describes one of them.
What are you planning to do though as QImage also has a pixel() function allowing you to access the colour directly?
02-12-2014 05:51 AM
02-12-2014 06:08 AM
02-12-2014 06:10 AM - edited 02-12-2014 06:15 AM
Ok then well you could use the pixel() function to write the bytes in to the DB via an array/buffer then use the setPixel() function to write them back.
However I'm not sure this would be any more efficient (depending on your implentation of course).
So go with the first suggestion by Simon, myself and Zmey, as it's less effort.
02-12-2014 06:32 AM - edited 02-12-2014 06:34 AM
I'm also going to predict your next questions and assume you want to go from the DB back to a QImage maybe even to an ImageView.
So there is a good thread on that here...