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

Script for auto-adjusting Levels, possible or not?

New Here ,
Oct 18, 2016 Oct 18, 2016

Copy link to clipboard

Copied

One of the things I am currently using Photoshop for is editing my digitised black and white negatives. I digitise them with my Sony A7ii camera and not a dedicated scanner, which results in low contrast RAW images. I've all ready set up an action to convert the negative raw files to positive tiff files, but I still need to edit the levels for every single image. That got me thinking, but before getting in to learning how to script, I am just going to ask if this is possible at all... It would speed up my workflow tremendously.

Is there a way that a script can be written that automatically adjusts the levels black and white points to where the curve starts? So the black point will move to the first black on the curve, and the white move to the first white on the curve?

See the image to clarify what I mean.

femfqt.jpg

Thanks for anyone who is able to answer this question or help me in any way!

TOPICS
Actions and scripting

Views

1.2K

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

correct answers 1 Correct answer

Advocate , Oct 18, 2016 Oct 18, 2016

This is possible. In fact, you would have two options:

a) analyze the histogram, and determine where the threshold would be, and then apply these values to the Levels function; this is pretty straightforward, but requres some programming

b) use the script recording plug-in to record what you do in the Levels dialog --> Options… --> Auto Color Correction Options dialog, and let that one do its work; this is quite simple and requires even less programming; it may OTOH require a bit more understandin

...

Votes

Translate

Translate
Adobe
Advocate ,
Oct 18, 2016 Oct 18, 2016

Copy link to clipboard

Copied

This is possible. In fact, you would have two options:

a) analyze the histogram, and determine where the threshold would be, and then apply these values to the Levels function; this is pretty straightforward, but requres some programming

b) use the script recording plug-in to record what you do in the Levels dialog --> Options… --> Auto Color Correction Options dialog, and let that one do its work; this is quite simple and requires even less programming; it may OTOH require a bit more understanding on how that functionality works

You may add (maybe using Applescript or VBS) a control structure which allows you to run a whole folder.

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 ,
Oct 18, 2016 Oct 18, 2016

Copy link to clipboard

Copied

LATEST

Thanks! I feel a bit stupid that I completely missed the Auto function with the Levels. I just added this step to the action I all ready had. Thanks a lot!

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
Enthusiast ,
Oct 18, 2016 Oct 18, 2016

Copy link to clipboard

Copied

var idLvls = charIDToTypeID( "Lvls" );

    var desc906 = new ActionDescriptor();

    var idAuCo = charIDToTypeID( "AuCo" );

    desc906.putBoolean( idAuCo, true );

executeAction( idLvls, desc906, DialogModes.NO );

http://sklad.bereza.cz/00-jarda/00_screenshot/2016-10-18_185139.jpg

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