Copy link to clipboard
Copied
I'm trying to write a script to recolour individual pixels in an image depending on their colour value (it's actually a greyscale image). The images are pretty big (4096 x 4096 pixels) and should consist of pixels that are 1 of approximately 60 different values that all need to be coloured differently. If the pixel values aren't one of these 60 colours then they should be coloured differently to highlight them.
Currently I have a script that adds a colorSampler, identifies the colour of the pixel at that location then creates a 1 x 1 pixel selection there and fills it with the appropriate colour. It then moves the colorSampler onto the next pixel and repeats the process. This is taking a veeerrry long time (about 3 minutes for a complete row of pixels).
Can anyone suggest a better method? Within Photoshop "select > color range" is very quick but it doesn't appear you can access this via a script. Would a better method be to access the color range tool via an action from within the script?
Thanks fo any help you can give.
Copy link to clipboard
Copied
See my answer to the post you made at PS-Scripts. It has a function to use color range.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now