hi,
i have an application wherein i need to compare two images and do some action based on the outcome.can anyone say me whether is there any class or built-in function for this ?
thanks in advance,
saravanan.
hi,
i have an application wherein i need to compare two images and do some action based on the outcome.can anyone say me whether is there any class or built-in function for this ?
thanks in advance,
saravanan.
No, there isn't.
You can start by comparing their sizes. Next, if they are equal, you have to start comparing them pixel by pixel.
An easier and faster solution is to convert the pixmaps to QImage( if they are QPixmaps) and use QImage::scanLine to retrieve lines from the two images and compare them with memcmp.
What about QPixmap::cacheKey() and QImage::cacheKey()?
J-P Nurmi
What if one of the images is too big to be stored in the pixmap cache?
He's using Qt 3.
EDIT: oh, that's in Qt 3 too.
Bookmarks