I found some solutions on Google, but they all seemed long and overly complicated for what I needed, so I decided to give it a try here.
My problem is simple, I want to draw 24-bit RGB pixels on the screen.
In Qt, I would do it like this (x and y are the height and width of the image, the data points to 24-bit RGB pixels):
QImage graph((uchar *)data, x, y, QImage::Format_RGB888); QLabel *label = new QLabel(); label->setPixmap(QPixmap::fromImage(graph)); label->setFixedSize(x, y); label->show();
Is there a similar clean way to do this in C / GTK?
Thanks in advance.
source share