Hey,
I was just wondering about QImage if its only restricted to 256 pixels to be displayed and if there was another format I could use to correct QImage or another class similar to QImage I can use to create images through pixels.
The following is the coding I used:
QRgb value;
value = qRgb (240,240,240);
image.setColor (256, value);
QImage image (13,20, QImage::Format_Indexed8);
QRgb value;
value = qRgb (240,240,240);
image.setColor (256, value);
To copy to clipboard, switch view to plain text mode
The following error is what I receive when I attempt to assign 260 Pixels:
QImage::setColor: Index out of bound 256
QImage::setColor: Index out of bound 257
QImage::setColor: Index out of bound 258
QImage::setColor: Index out of bound 259
QImage::setPixel: Index 257 out of range
QImage::setPixel: Index 258 out of range
QImage::setPixel: Index 259 out of range
Thanks,
Strateng
Bookmarks