Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Question about imageViews

Hi! i had an idea for an app and i'm trying to tackle it, basically i need to edit a zone in an image or picture taken, i want to select the same color pixels, kind of like the magic wand tool in pic editor. Anyone has any idea on how to do this? or where can i find documentation to try it, thanks in advance! Ben Jakuben

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I don't know for sure, but you can get the color for a specific pixel if you have its coordinates: http://stackoverflow.com/a/7807442/475217

As for getting the coordinates of what is touched on the screen, here's another post that might get you started: http://stackoverflow.com/a/2939405/475217

Once you have the color, I'm not sure what else you could do other than loop through all the pixels in the bitmap you get from the ImageView. Sounds like a fun and challenging project. :)

thanks Ben Jakuben ! i'll try to do it in a loop, see if it's possible