Qt-interest Archive, March 2002
QImageIO - question
Message 1 in thread
Hi,
I want to read Images (eg. file.bmp) from a connected socket s.
I use the code below. But qimageio.read() returns FALSE.
The communication partner opens a file.bmp in binary mode and sends it to the
socket.
What goes wrong ?
QSocket qsocket;
qsocket.setSocket(s);
QImageIO qimageio;
qimageio.setIODevice(&qsocket);
qimageio.setFormat(text);
if( qimageio.read() )
...
Yours:
Rainer Lehrig
Message 2 in thread
Rainer Lehrig schrieb:
>
> I want to read Images (eg. file.bmp) from a connected socket s.
[...]
> QSocket qsocket;
> qsocket.setSocket(s);
> QImageIO qimageio;
> qimageio.setIODevice(&qsocket);
> qimageio.setFormat(text);
> if( qimageio.read() )
> ...
What are the contents of "text"?
Have you tried without the call to setFormat()?