Script to convert Adobe(1998) to sRGB?

LuckyCrittersLuckyCritters Registered Users Posts: 9 Beginner grinner
edited August 23, 2005 in Finishing School
OK, I have a BUNCH of photos that need to have their color profile converted. There are literally tens of thousands of photos and thousands of directories.

The Image Processor in CS2 has the ability to convert profile to sRGB and seems to work great except it does not have an option to include subfolders or to actually overwrite the originals. (I don't want to create another 50GB of copied photos).

I see the function to convert the profile actually look like this:

function ConvertTosRGBProfile() {
var id136 = stringIDToTypeID( "convertToProfile" );
var desc31 = new ActionDescriptor();
var id137 = charIDToTypeID( "null" );
var ref6 = new ActionReference();
var id138 = charIDToTypeID( "Dcmn" );
var id139 = charIDToTypeID( "Ordn" );
var id140 = charIDToTypeID( "Trgt" );
ref6.putEnumerated( id138, id139, id140 );
desc31.putReference( id137, ref6 );
var id141 = charIDToTypeID( "T " );
desc31.putString( id141, "sRGB IEC61966-2.1" );
var id142 = charIDToTypeID( "Inte" );
var id143 = charIDToTypeID( "Inte" );
var id144 = charIDToTypeID( "Clrm" );
desc31.putEnumerated( id142, id143, id144 );
var id145 = charIDToTypeID( "MpBl" );
desc31.putBoolean( id145, true );
var id146 = charIDToTypeID( "Dthr" );
desc31.putBoolean( id146, true );
executeAction( id136, desc31, DialogModes.NO );
}

Does anyone have a script to open a folder AND its subfolders and convert the profile to sRGB? Preferably the script would just change the original, but if it saves a coipy, I can live with that.

Thanks!
Chris

Comments

  • cletuscletus Registered Users Posts: 1,930 Major grins
    edited August 23, 2005
    OK, I have a BUNCH of photos that need to have their color profile converted. There are literally tens of thousands of photos and thousands of directories.

    The Image Processor in CS2 has the ability to convert profile to sRGB and seems to work great except it does not have an option to include subfolders or to actually overwrite the originals. (I don't want to create another 50GB of copied photos).

    I see the function to convert the profile actually look like this:

    function ConvertTosRGBProfile() {
    var id136 = stringIDToTypeID( "convertToProfile" );
    var desc31 = new ActionDescriptor();
    var id137 = charIDToTypeID( "null" );
    var ref6 = new ActionReference();
    var id138 = charIDToTypeID( "Dcmn" );
    var id139 = charIDToTypeID( "Ordn" );
    var id140 = charIDToTypeID( "Trgt" );
    ref6.putEnumerated( id138, id139, id140 );
    desc31.putReference( id137, ref6 );
    var id141 = charIDToTypeID( "T " );
    desc31.putString( id141, "sRGB IEC61966-2.1" );
    var id142 = charIDToTypeID( "Inte" );
    var id143 = charIDToTypeID( "Inte" );
    var id144 = charIDToTypeID( "Clrm" );
    desc31.putEnumerated( id142, id143, id144 );
    var id145 = charIDToTypeID( "MpBl" );
    desc31.putBoolean( id145, true );
    var id146 = charIDToTypeID( "Dthr" );
    desc31.putBoolean( id146, true );
    executeAction( id136, desc31, DialogModes.NO );
    }

    Does anyone have a script to open a folder AND its subfolders and convert the profile to sRGB? Preferably the script would just change the original, but if it saves a coipy, I can live with that.

    Thanks!
    Chris
    There should be something, but I don't have access to PS right now to dig around. Have you tried the PS Scripting forum over at Adobe Studios???
  • LuckyCrittersLuckyCritters Registered Users Posts: 9 Beginner grinner
    edited August 23, 2005
    cletus wrote:
    There should be something, but I don't have access to PS right now to dig around. Have you tried the PS Scripting forum over at Adobe Studios???
    Thanks for the tip, I went ahead and posted there as well. thumb.gif
Sign In or Register to comment.