I work with laboratory profiles, and ocassionally some photo go with a wrong profile, and, that's when I realized,that my script don't work well
how to make a script to convert a profile to an image that already has the profile
Here is the code so that I can help, please
Code: Select allvar idconvertToProfile = stringIDToTypeID( "convertToProfile" );
var desc442 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref52 = new ActionReference();
var idDcmn = charIDToTypeID( "Dcmn" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref52.putEnumerated( idDcmn, idOrdn, idTrgt );
desc442.putReference( idnull, ref52 );
var idT = charIDToTypeID( "T " );
desc442.putString( idT, "Adobe RGB (1998)" );
var idInte = charIDToTypeID( "Inte" );
var idInte = charIDToTypeID( "Inte" );
var idImg = charIDToTypeID( "Img " );
desc442.putEnumerated( idInte, idInte, idImg );
var idMpBl = charIDToTypeID( "MpBl" );
desc442.putBoolean( idMpBl, true );
var idDthr = charIDToTypeID( "Dthr" );
desc442.putBoolean( idDthr, true );
var idsdwM = charIDToTypeID( "sdwM" );
desc442.putInteger( idsdwM, 2 );
executeAction( idconvertToProfile, desc442, DialogModes.NO );
Thanks to all
Applying the document profile script does not work
-
Mike Hale
Applying the document profile script does not work
If you want to make sure the document is in has the Adobe RGB profile one way to do this would be to first check it's current profile to see if it needs to be changed. Then convert only when needed.
Code: Select allif(app.activeDocument.colorProfileName != "Adobe RGB (1998)"){
app.activeDocument.convertProfile( "Adobe RGB (1998)", Intent.PERCEPTUAL,true,true);
}
Code: Select allif(app.activeDocument.colorProfileName != "Adobe RGB (1998)"){
app.activeDocument.convertProfile( "Adobe RGB (1998)", Intent.PERCEPTUAL,true,true);
}
-
MIRYAMM
Applying the document profile script does not work
Thanks a millon, Mike.
Is just I need
Is just I need