# Grab Pixels Around Edges of an Irregular Image Shape

**URL:** <https://discourse.processing.org/t/grab-pixels-around-edges-of-an-irregular-image-shape/20020>\
**Category:** Coding Questions\
**Created:** [April 22, 2020, 5:25am UTC](https://discourse.processing.org/t/grab-pixels-around-edges-of-an-irregular-image-shape/20020 "2020-04-22T05:25:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 3, 2020, 6:19pm UTC](https://discourse.processing.org/t/grab-pixels-around-edges-of-an-irregular-image-shape/20020/4 "2020-05-03T18:19:11Z")

</div>

I also believe that @phoebus did a p5.js version of picking recently

> [@Only take the Top One](https://discourse.processing.org/t/only-take-the-top-one/17115):
>
> Hi there, long time no see slight_smile I want to make some sort of 2d picking on a 2D sketch: I made a test “isOver” on my objects, so my objects change color when mouse is over ( dist(mouseX…) So in my main I get the “mouseIsOver” for every instances of my object =\> but I want to make it so that, if I click, I activate ONLY THE TOP ONE I’m thinking of using an array and getting only the highest index of the “true” values but I sense there is a simple solution out there. Any Idea ? cod…

https://editor.p5js.org/rich-gg/sketches/JA2Qp4JFE

---

_[View the full topic](https://discourse.processing.org/t/grab-pixels-around-edges-of-an-irregular-image-shape/20020)._
