Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: draw line between black pixel : coordinates of selected pixels ?

$
0
0

I think this task will be slow using javascript no matter how it is done.

 

You could use select color range to select the black pixels. But the selection bounds would include all the black pixels. You will not be able to tell where each black pixel is from the selection directly. You could convert the selection into a path. From the path you could get the x,y position of each subpath point to get the bounds of each pixel. I haven't tested this but you might only have to check the first pathpoint in each subpath to get the top left x,y position of the pixel. And there may be some top left to right bottom order in the subpaths that you could take advantage of.

 

Once you have the positions of each black point from the path the script should be able to determine if any are within 5px of each other just using those positions.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>