Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get all pixel coordinates of selection
#3
(09-27-2021, 07:37 PM)joho21 Wrote: Hello there! I've used GIMP for various different things over time and I've recently been thinking about how to automate some of my image processing needs. What I would like to know: is there an easy way to either get a list of all the XY coordinates of all pixels in a  particular selection or, barring that, get the XY coordinates of all the pixels on a given layer?

That would be a huge list...  You can get the "bounding box" of a selection, or the origin and size of a layer. You can also get the selection as a mask and get the selection level of any pixel. A last way is to convert the selection to a path, which is described by a few hundred points, and there are algorithms to determine if a point is inside or outside the shape.

But as PixLab says, it looks like you are starting in the wrong direction, so what makes you think you need this? What is the original problem?
Reply


Messages In This Thread
RE: Get all pixel coordinates of selection - by Ofnuts - 09-28-2021, 08:18 AM

Forum Jump: