QImage::Format_RGB32
Warning: If you are accessing 32-bpp image data, cast the returned pointer to QRgb* (QRgb has a 32-bit size) and use it to read/write the pixel value. You cannot use the uchar* pointer directly, because the pixel format depends on the byte order on the underlying platform. Use qRed(), qGreen(), qBlue(), and qAlpha() to access the pixels.
uint *p = (uint*)qtemp.scanLine (y) + x;
1 2 3 4
| QRgb* rgb = (QRgb*)img.scanLine(y);
Puis
for (int x = 0; x < img.width(); x++) {
rgb[x] = qRgba(255 - qRed(rgb[x]), 255 - qGreen(rgb[x]), 255 - qBlue(rgb[x]), qAlpha(rgb[x])); |
Je ne vois pas de uint dans la doc.
Mais je n'ai pas les yeux en face des trous.
En plus, je ne m'attendais pas à cela au debut de la conversation et je n'y connais rien en images//videos.
1 2 3
| qApp->processEvents();
Ou
label->repaint(); |
Cela me semble plus clair, mais cela ne changera rien à ton problème.
Edit ....
Tu as modifié ton message là
C'est pas du jeux
Avec la ligne du compilo c'est trop simple.
Puis, il faut sauver l'image non ?
Partager