Ok.. I havent used QImage or QImagereader before; and perhaps I misunderstand them...
Hello, i am trying to send a QImage file over serial port; but i couldn't manage it..
There is no data sent in serial port monitor, when i send the file "avatar.gif"..(with send function of Qextserialport)
Am i missing something...
What i understand is that:
QImage picture
(80,
80,
QImage::Format_RGB32);
// a picture object formed
QImageReader reader
("C:/Documents and Settings/pc/MyDocuments/Visual Studio 2005/Projects/videocapture3/avatar.gif");
//avatar.gif is read into "reader"
reader.read(&picture); // reads the image from reade into picture..
picture.loadFromData(bytes); // bytes are filled here
sp->send(bytes.size(),bytes.data());// bytes are sent here
QByteArray bytes;// a bytes array formed
QImage picture(80, 80,QImage::Format_RGB32); // a picture object formed
QImageReader reader("C:/Documents and Settings/pc/MyDocuments/Visual Studio 2005/Projects/videocapture3/avatar.gif"); //avatar.gif is read into "reader"
reader.read(&picture); // reads the image from reade into picture..
picture.loadFromData(bytes); // bytes are filled here
sp->send(bytes.size(),bytes.data());// bytes are sent here
To copy to clipboard, switch view to plain text mode
is that wrong?
Bookmarks