Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

Let's say I have 100 photos in a folder. On the first one, I would like to change the Hue to -180, and save it. On the second one, I would like to change the Hue to -170. On the third one, I would like to change the Hue to -160, and so on.

Is there a way to batch process with a different value each time?

share|improve this question
1  
By definition, it wouldn't really be "batch" processing if there's a variation each time. –  Scott Dec 16 '13 at 20:14
add comment

3 Answers 3

I'd probably use ImageMagick.

There is a feature available to modify the hue, but it's percentage based instead of degrees.

Hue Modulation

Rotates the colors of the image, in a cyclic manner. To achieve this the Hue value given produces a 'modulus addition', rather than a multiplication. However be warned that the hue is rotated using a percentage, and not by an angle.

convert rose:   -modulate 100,100,0      mod_hue_0.gif
convert rose:   -modulate 100,100,33.3   mod_hue_33.gif
convert rose:   -modulate 100,100,66.6   mod_hue_66.gif
convert rose:   -modulate 100,100,100    mod_hue_100.gif
convert rose:   -modulate 100,100,133.3  mod_hue_133.gif
convert rose:   -modulate 100,100,166.6  mod_hue_166.gif
convert rose:   -modulate 100,100,200    mod_hue_200.gif

Result:

hue modulation: 0 hue modulation: 33.3 hue modulation: 66.6 hue modulation: 100 hue modulation: 133.3 hue modulation: 166.6 hue modulation: 200

Most of the heavy lifting is done for you in that example, you would just need to create a script that indexes all the files in a directory and applies a sequential value given to the modulate argument.

share|improve this answer
    
+1 for imageMagick. Fiddly to get going, but extraordinarily powerful. –  Random O'Reilly Dec 17 '13 at 0:07
add comment

This could be accomplished with PS scripting. As it is a pretty unique request, you might have trouble finding an existing script that does that. You'd probably either have to code it up yourself or hire someone who can do it for you.

share|improve this answer
1  
Already provided ;) –  Adam Elsodaney Dec 19 '13 at 12:50
add comment

I have a script that will do just that. Just save it as something like changeHuePerLayer.jsx and drag and drop it on top the Photoshop dock icon on the Mac. On Windows I think you need to open it from the menu (not sure where).

#target photoshop
app.bringToFront();

var
    LOWER_HUE_LIMIT = -180,
    UPPER_HUE_LIMIT = 180;
var
    hueValue = LOWER_HUE_LIMIT,
    hueIncrementor = 10,
    currentDoc = app.activeDocument;


for ( var i = 0; i < currentDoc.layers.length; i++ ) {
    currentDoc.activeLayer = currentDoc.layers[i];
    hueValue = hueValue < UPPER_HUE_LIMIT ? hueValue + hueIncrementor : LOWER_HUE_LIMIT;
    applyHsl( hueValue, 0, 0 );
}


/**
 *
 * @param {number} hue
 * @param {number} saturation
 * @param {number} lightness
 */
function applyHsl( hue, saturation, lightness ) {
    var HUE_SAT_ADJUSTMENT_V2_SYM  = 'Hst2';
    var COLORIZE_SYM               = 'Clrz';
    var ADJUSTMENT_SYM             = 'Adjs';
    var HUE_SYM                    = 'H   ';
    var SATURATION_SYM             = 'Strt';
    var LIGHTNESS_SYM              = 'Lght';
    var HUE_SATURATION_SYM         = 'HStr';

    var colorizeDescriptor = new ActionDescriptor();
    var hueSatDescriptor = new ActionDescriptor();
    var hueSatAdjustmentList = new ActionList();

    colorizeDescriptor.putBoolean( charIDToTypeID( COLORIZE_SYM ), false );

    hueSatDescriptor.putInteger( charIDToTypeID( HUE_SYM ), hue );
    hueSatDescriptor.putInteger( charIDToTypeID( SATURATION_SYM ), saturation );
    hueSatDescriptor.putInteger( charIDToTypeID( LIGHTNESS_SYM ), lightness );

    hueSatAdjustmentList.putObject( charIDToTypeID( HUE_SAT_ADJUSTMENT_V2_SYM ), hueSatDescriptor );
    colorizeDescriptor.putList( charIDToTypeID( ADJUSTMENT_SYM ), hueSatAdjustmentList );

    executeAction(
        charIDToTypeID( HUE_SATURATION_SYM ),
        colorizeDescriptor,
        DialogModes.NO
    );
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.