Are you intially using one canvas for everything? If so, then you just check a rectangular region around your image and see if the mouse position is inside or outside of that region.
Or... do you have a seperate canvas for this image you want to pick colors from? If so, using the pseudo method I shown above should work for you.
You said you had to create a second canvas as a background? Did you use a second canvas for your image to pick color from before I replied the first time?
Or... do you have a seperate canvas for this image you want to pick colors from? If so, using the pseudo method I shown above should work for you.
You said you had to create a second canvas as a background? Did you use a second canvas for your image to pick color from before I replied the first time?