Hi Friends,
I am trying to display an image in a label, using QT - QImage.
The image does get displayed in the label , but there are no colors , I
have tried various images with different depths and formats (I am not
trying jpeg) , I tried with bmp & png formats.
The result is always the same , the picture is displayed only in grey
scale, and the debugging print shows 16 as depth and 0 colour count.
What am I missing ?
The code is simple : *******************************
QString imgstr;
imgstr.append("/home/root/test.png");
QPixmap mypixmap;
if(mypixmap.load(imgstr))
{
QTextStream(stdout) << " ************************* SET
IMAGE "<< mypixmap.depth() << " colours" << mypixmap.colorCount() <<
"\n"<< endl;
ui->l_pic->setPixmap(mypixmap);
ui->l_pic->show();
ui->l_pic->repaint();
repaint();
}
*****************************************
Regards,
Anubhav
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.