-1

I am trying to erase which has same colour pixel from particular coordinates and want to erase that pixel.I used floodfill algorithm but it not working properly.I looking for a tool like magicwand tool.

So I am trying to implement on my own so can anyone please help me how to compare two pixel in an image?

please help me with the code or sample example.

3

1 Answer 1

1

You can use CGBitmapContext to get to the image memory. You need to know how is your image data organized (8 bit, 16 bit per component), how many components you have per pixel and in what order (RGB, RGBA, ARGB, CMYK, ...)

The data is organized as horizontal rows of pixels (e.g. RGBRGBRGBRGB) with top image pixel row first, so you can access them as 2 dimensional array with rows and columns indices giving the pixel x-y position with top left pixel being [0][0].

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.