Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get all pixel coordinates of selection
#4
(09-28-2021, 04:02 AM)PixLab Wrote:
Quote: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?

I don't see where you want to go with "particular selection". You have multiple selection?
Or you want every coordinate of every single pixel?
What do you want to achieve by doing so?
Please give us a bigger "picture" about what you would really like to do.

Speaking about XY https://xyproblem.info/ Wink
(thanks to Ofnuts for that link)

Sure, I can give the bigger picture. I've got a map that will be used for a conflict-type game, hosted by a Discord bot. What I'd like to accomplish is for the different provinces of the said map to be automatically colored based on who owns them. Ie, if one person conquers province 8, province 8 will now be their color. I was looking at using PILLOW, which lets you color images, but only one pixel at a time. I'd have to get a list of all the pixels within the bounds of each province in order to change their color automatically. The difficult part is just getting a list of XY coordinates for the pixels within each province boundary. Doing it by hand is not preferable. I looked at the "color select" and just the plain old magic wand tool on GIMP to see, but it only gives me like the XY coordinates of the upper-left point of the selection.
Reply


Messages In This Thread
RE: Get all pixel coordinates of selection - by joho21 - 09-28-2021, 12:17 PM

Forum Jump: