[KDE-India] Reading Binary file

Aditya Mooley aditya.ml at gmail.com
Tue Jan 10 13:40:49 CET 2006


On 1/9/06, Till Adam <adam at kde.org> wrote:
>
>
> Ah, I see now. The problem is that you are using QCString::append() to add
> the
> file to the ByteArray. That will look for a terminating \0 in the string
> and
> use the data only until that byte. Which in the case of PNG is the 6th
> byte
> or so, due to the png header. You'll have to memcopy the data into the
> target
> bytearray, treating it as a QCString won't work.


Thanks. I solved the problem by using QTextstream. Now, have a problem of
how to make syncronous HTTP calls.
Guess I will solve that ultimately.

Thanks for all the help.

Regards,


--
Aditya
=============================================================
PHP Applications for E-Biz: http://www.sanisoft.com
Coppermine Picture Gallery: http://coppermine.sf.net
=============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-india/attachments/20060110/f61ebc81/attachment-0001.html 


More information about the KDE-india mailing list