how to generate image from raw pixel data
Unsolved
Mobile and Embedded
-
hi
how to generate image from raw pixel data .
at present i am using thisint pixel=0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { QRgb value = qRgb((Auto_image_RGBdata[pixel] >> 22 & 0x000000ff),(Auto_image_RGBdata[pixel] >> 12 & 0x000000ff), (Auto_image_RGBdata[pixel]>>2 & 0x000000ff)); pixel+=1; img.setPixel(x,y,value); } } ui->port_2->setPixmap(QPixmap::fromImage(img.scaled(781,351,Qt::IgnoreAspectRatio,Qt::SmoothTransformation))); ui->port_2->setScaledContents(true);
is there any faster method than this?
-
@swansorter said in how to generate image from raw pixel data:
is there any faster method than this?
of course
reading the documentation yields: