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

How can i detect hi-lights above 250 using JavaScript

New Here ,
Aug 15, 2008 Aug 15, 2008

Copy link to clipboard

Copied

HI everyone

i have an script that deletes alpha channels, paths, layer comps, flat the image, change color mode, set resolution to 300 ppi and so on, but now I need to make a selection or at list detect highlights above 250 in RGB channels and also I need to find a way to change the "color profile" from X profile to "Adobe RGB 1998"

Thanks
TOPICS
Actions and scripting

Views

1.7K

Translate

Translate

Report

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
Valorous Hero ,
Aug 16, 2008 Aug 16, 2008

Copy link to clipboard

Copied

Here is some code that might do the job for your highlights..
http://ps-scripts.com/bb/viewtopic.php?p=9318#9318

as for profiles see this thread..
http://www.ps-scripts.com/bb/viewtopic.php?t=2133&highlight=profile

Votes

Translate

Translate

Report

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
Explorer ,
Apr 10, 2019 Apr 10, 2019

Copy link to clipboard

Copied

Hi Paul,

I am looking for a jsx-code to automate the detection of the coordinates of the brightest/darkest pixels in a photoshop file.

Searching the forum I found your answer with a link to ps-scripts.com.

Unfortunately the thread you are referring to is not available any more.

Do you have by chance the code from this thread?

Thanks for any help.

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 10, 2019 Apr 10, 2019

Copy link to clipboard

Copied

Paul left here years ago this thread is eleven years old

JJMack

Votes

Translate

Translate

Report

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
Contributor ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

Bonjour

Using the select Color Range function (scrObj)
from Mike Hale :

//Recherche de crame

var blue = new SolidColor();

blue.rgb["hexValue"] =  "ffffff"          // "829fb1"       // "0000ff";

for( var f = 0; f < activeDocument.artLayers.length; f++ ){ activeDocument.activeLayer = activeDocument.artLayers;

   selectColorRange(blue);

  

function selectColorRange(scObj){

    var desc = new ActionDescriptor();

    desc.putInteger( charIDToTypeID( "Fzns" ), 0 );

        var cDesc = new ActionDescriptor();

        cDesc.putDouble( charIDToTypeID( "Rd  " ), scObj.rgb.red);

        cDesc.putDouble( charIDToTypeID( "Grn " ), scObj.rgb.green);

        cDesc.putDouble( charIDToTypeID( "Bl  " ), scObj.rgb.blue );

    desc.putObject( charIDToTypeID( "Mnm " ), charIDToTypeID( "RGBC" ), cDesc );

    desc.putObject( charIDToTypeID( "Mxm " ), charIDToTypeID( "RGBC" ), cDesc );

   executeAction( charIDToTypeID( "ClrR" ), desc, DialogModes.NO );

}

Votes

Translate

Translate

Report

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
People's Champ ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

And what are you going to do with the coordinates of the pixels? There may be a lot of them.

Votes

Translate

Translate

Report

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
Contributor ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

I have a hair in my hand!

Votes

Translate

Translate

Report

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
Explorer ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

I am just trying to automate photoshop color correction with a curve adjLayer using it's eyedropper tool for white, grey and black values.

To adjust the curves by script I need to know the coordinates of the brightest highlights, 50% grey values and the deepest shadows in the picture.

Manually I would do that using the slider in a threshold adjLayer to detect the brightest resp. darkest values and marking them with the eyedropper tool (I). Jimmy McIntyre has described this procedure in his  "Powerful Color Correction Photoshop Tutorial".

It would be great to do that by script.

Votes

Translate

Translate

Report

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
Contributor ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

LATEST

I do it with several personal jsx scripts
Under Win 10 and CS5

Votes

Translate

Translate

Report

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
New Here ,
Aug 17, 2008 Aug 17, 2008

Copy link to clipboard

Copied

thats exactly what i need but y still have problems with the color profile, I've tried the code but don't work for me. but Thanks

Votes

Translate

Translate

Report

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