[Qt-interest] Convert an array to a JPEG

Sean Harmer sean.harmer at maps-technology.com
Fri Sep 2 13:26:57 CEST 2011


Hi,

On Friday 02 September 2011 12:19:08 Robert Wood wrote:
> I have downloaded a JPEG and have it sitting in a biggish array of
> ViChar which I believe is just a normal eight bit char. I have then
> opened a file and used QTextStream to send these bytes out, one at a
> time into a .jpeg file.

Don't use QTextStream to save binary data. Just use QFile::write( const char * 
data, qint64 maxSize ) directly.

Cheers,

Sean




More information about the Qt-interest-old mailing list