Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Recolouring pixels

Guest
Sep 02, 2009 Sep 02, 2009

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.

TOPICS
Actions and scripting
592
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Sep 02, 2009 Sep 02, 2009
LATEST

See my answer to the post you made at PS-Scripts. It has a function to use color range.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines