07-03-2013 10:36 AM
I'm having an image with me and I would like to save it in a path. I was able to get the datastream of that path.
QFile qFile("file://" + workingDir+ "/temp.jpg"); if (!qFile.open(QIODevice::WriteOnly)) return; QDataStream out(&qFile);
From then, I'm unable to crack how to write my Image which is present in my object to the QDataStrean.
Please help me out.
Solved! Go to Solution.
07-03-2013 10:56 AM
07-03-2013 11:57 AM
07-04-2013 01:23 AM
Try this (where imageData is of type ImageData, and outputFilePath is of type QString):
ImageConverter::encode (QUrl::fromLocalFile (outputFilePath), imageData, 75);
07-04-2013 03:45 AM