Ey,
Here is one fastly and not-tested code file:
First I dont remember is it (x,y) or (y,x). So thats might be the first one which causes problems :)
Code:
private function find_pixel (pic as bitmap, pic2 as bitmap) as string
pic = 'image where u want to search another picture'
pic2 = 'image you are finding from pic'
Dim pixelCol as color
for x = 0 to pic.width -1
for y=0 to pic.height -1
PixelCol = pic.getPixel(y,x) 'or (x,y) I dont remember..'
if PixelCol = pic2.getPixel(0,0) then 'first pixel is 100% same color'
'now depend on image size and what u want to do but there is one solution (to check whole image):'
for i=0 to pic2.width - 1
for j=0 to pic2.height -1
if pic.getPixel(y+j, x+i) = pic2.getPixel(i,j) then
'match -> lets check next pixel'
else
'not same image'
next y
exit for 'exit for j'
end if
Return y,x 'or (y+j, x+i) or what pixel u want? first is starting pixel and secong last pixel'
next j
next i
end if
next y
next x
end function
The above is ok for smaller images but its a bit slow. To do the same faster, take a look:
[Only registered and activated users can see links. Click Here To Register...]