You are here

Is it possible to output the coordinates certain pixels?

I have an image of a very complex polygon (its the letter "R" in a fancy, gothic font) and I want to be able to output to a text file the x,y coordinates for certain pixels on the image. I googled around and looked at some documentation, but I didn't see anything that could do this in Python.

I don't think this matters, but I want the output to be in the form of a list in Java.
For example: int[] xCoords = {x1, x2, x3}; for the x values and int[] yCoords = {y1, y2, y3}; for the respective y values.

Disclaimer: I am VERY new to the scripting world of GIMP. It seems like there is a simple solution for this, but I have no clue.

You have not specified the problem in sufficient detail for anyone to be able to help you.

It seems to me that the critical part of the problem is identifying "certain pixels". Could you please explain how you are picking which pixels you are interested in. Once that is determined, it should be simple enough to create the lists of coordinates that you require.

Kevin

Subscribe to Comments for "Is it possible to output the coordinates certain pixels?"