[SOLVED]Compare bitmaps?

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

[SOLVED]Compare bitmaps?

Postby Shaka » Thu Nov 26, 2009 8:12 am

Hello!

Is there an easy way to check if two bitmaps are the same, not reference wise but contains the same pixel data? I gues I could extract all the pixels and compare the arrays, just wondering if there is an easier way?

Regards/Per
Last edited by Shaka on Thu Dec 10, 2009 4:31 pm, edited 1 time in total.
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Top

Postby wiederke » Thu Nov 26, 2009 1:01 pm

Hi,

you can calculate a hash value out of the image data and compare the hash value instead of the whole image.


Torsten
wiederke
Experienced Developer
Experienced Developer
 
Posts: 72
Joined: Mon Mar 02, 2009 6:46 pm
Location: Germany

Postby Shaka » Tue Dec 08, 2009 1:06 pm

wiederke wrote:Hi,

you can calculate a hash value out of the image data and compare the hash value instead of the whole image.


Torsten


Thanks for the suggestion. I did solve it in another way (compare the resource id) :) So what I did earlier with comparing pixels was a bit overkill.

Regard/Per
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Re: [SOLVED]Compare bitmaps?

Postby newranji » Tue Jun 08, 2010 4:59 pm

Hi Shaka,

How did you the comparison?
Can you help me out?

Thanks,
Ranjith
newranji
Freshman
Freshman
 
Posts: 3
Joined: Fri Nov 23, 2007 5:59 am
Location: India

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest