Here is what I'm doing to calculate an Image checksum :
quint16 ZePicturePool
::generateChecksum(const QPixmap & pixmap
){
QImage image
= pixmap.
toImage();
quint16 checksum = qChecksum((char *) (image.bits()), image.numBytes());
return checksum;
}
quint16 ZePicturePool::generateChecksum(const QPixmap & pixmap)
{
QImage image = pixmap.toImage();
quint16 checksum = qChecksum((char *) (image.bits()), image.numBytes());
return checksum;
}
To copy to clipboard, switch view to plain text mode
Is it the good approach ?
Bookmarks