Qimage Grayscale Format Indexed8
QImage::QImage ( uchar. data, int width, int height, Format format ) Constructs an image width pixels wide, height pixels high with a format of format, that uses an existing memory buffer, data. The buffer must remain valid throughout the life of the QImage. The image does not delete the buffer at destruction. QImage:: QImage (uchar.data, int width, int height, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void.cleanupInfo = nullptr) Constructs an image with the given width, height and format, that uses an existing memory buffer, data.
Finally, the Stripes script is here for all you quotes spouting fans of theBill Murray army movie starring Harold Ramis, John Candy, Sean Young, etc. This script is a transcript that was painstakingly transcribed using the screenplay and/or viewings of Stripes. I know, I know, I still need to get the cast names in there and I'll be eternally tweaking it, so if you have any corrections. Stripes movie script. Read, review and discuss the entire Stripes movie script by Len Blum on Scripts.com.
(6)
I have been trying to display a gray-scale image using Qt. The image data is loaded from a .txt file that contains 256x256 float data. There is no header involved for the image. I have tried the solution posted in this link
I used QLabel
class to call setPixmap
of my uchar* image_data_array
. Even though I could get a Qt GUI window to open, but the window shows just blank screen.
imageLabel -> setPixmap(QPixmap::fromImage(*myImage));
How are you loading the QImage with the grey image data ?
QT doesn't have a greyscale image type, only a bilevel type. You can either create an RGB image with R=G=B=grey. Or more preferably use QImage::Format_Indexed8
and create a colour table where each entry has the same value as the index. i.e.
- Status:Closed
- Resolution: Out of scope
- Fix Version/s:Some future release
- Labels:
Currently, the only 8bit QImage is QImage::Format_Indexed8. With the right color table, it can be made to act like an 8bit grayscale. However, QPainter does not support drawing on a QImage of QImage::Format_Indexed8. Direct support for QImage::Format_Grayscale would allow for direct manipulation of a QImage that could be used as an alpha channel.
Gerrit Reviews
- Assignee:
- Gunnar Sletta
- Reporter:
- Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
- Votes:
- 0Vote for this issue
- Watchers:
- 0Start watching this issue