0
votes

I have 3 bitmaps (Bitmap A, Bitmap B and Bitmap C). I added Bitmap B to Bitmap A to form Bitmap C. How can I ensure that Bitmap C contain Bitmap B assuming Bitmap B is at the foreground while Bitmap A is the background? I wanted to check pixels but the height/width of Bitmap C is different from Bitmap B since Bitmap A is larger than Bitmap B.

Edit: The area which the Bitmap B is added into is generated randomly.

Example

I want to check whether B is within C.

1
I added Bitmap B to Bitmap A to form Bitmap C this has little sense to me... you cannot "add" any Bitmap to other Bitmappskink
Yes. I "draw" Bitmap B ontop Bitmap A using a canvas.Ophitect
ok i see it now, so what is your real problem actually?pskink
After drawing, I want to compare and check whether Bitmap C (the canvas) contain the Bitmap B.Ophitect
contain? you mean its bounds?pskink

1 Answers

0
votes

You can compare pixelwise the region that B occupies in C with the pixels of B. Their values should be equal then.