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

How to change pixel color with javascript in Photoshop?

New Here ,
Jun 14, 2017 Jun 14, 2017

I have layer in Photoshop where with brush is drawn something. I need to read this layer pixel for instance pixel with coordinates (100,100) and write to new layer this pixel with changed pixel color. How to do it with javascript? I use Photoshop CC.

TOPICS
Actions and scripting
2.3K
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
Guide ,
Jun 14, 2017 Jun 14, 2017
LATEST

#target photoshop;

if(documents.length){

var Left = 100;

var Right = 101;

var Top = 100;

var Bottom = 101;

var fillColour = new SolidColor();

fillColour.rgb.hexValue="00ff00";

activeDocument.selection.select([[Left,Top],[Right,Top],[Right,Bottom],[Left,Bottom]], SelectionType.REPLACE, 0, false);

executeAction(charIDToTypeID( "CpTL" ), undefined, DialogModes.NO );

activeDocument.selection.select([[Left,Top],[Right,Top],[Right,Bottom],[Left,Bottom]], SelectionType.REPLACE, 0, false);

activeDocument.selection.fill(fillColour);

activeDocument.selection.deselect();

}

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