Big thanks but I get the wrong color.

iiibiiay
::iiibiiay(QImage* img
){ width=img->width();
height=img->height();
rowstride=img->bytesPerLine();
hasAlpha=img->hasAlphaChannel();
channels =img->isGrayscale()?1:hasAlpha?4:3;
bitsPerSample=img->depth()/channels;
image.append((char*)img->bits(),img->numBytes());
}
iiibiiay::iiibiiay(QImage* img){
width=img->width();
height=img->height();
rowstride=img->bytesPerLine();
hasAlpha=img->hasAlphaChannel();
channels =img->isGrayscale()?1:hasAlpha?4:3;
bitsPerSample=img->depth()/channels;
image.append((char*)img->bits(),img->numBytes());
}
To copy to clipboard, switch view to plain text mode
Bookmarks