You are not logged in.

1

Tuesday, September 20th 2011, 5:41am

Compare 2 QImages?

Quoted


hi all,
i want to compare 2 QImages, please share the logic, i have already used operator==, but it takes to much time.
Can someone explain how scanline function works?

thanks in advance



Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ImageCompare::ImageCompare(){
pixmapImage1=new QPixmap();
pixmapImage1.load("C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\img1");

pixmapImage2=new QPixmap();
pixmapImage1.load("C:\\Documents and Settings\\469317\\My Documents\\My Pictures\\img2");

//convert image to QImage
QImage image1=pixmapImage1.toImage();
QImage image2=pixmapImage2.toImage();
 
if(image1==image2)return true;
else
return false;


}




2

Tuesday, September 20th 2011, 12:14pm

do you think you can do better than the nokia/trolltech people that coded == in the first place?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Used tags

compare, QImage