Add icc profiles dynamically with scripting and photoshop configurator?
Posted: Mon Jul 16, 2012 3:34 pm
Hello all,
I'm trying to create a script for the photoshop configurator, which attachs dynamically an icc profile to an incoming tiff file (without icc profile). Unfortunately my scripting knowledge is very poor, so I tried to use the script just to call different photoshop actions (which defines the icc profile to tag). The photoshop actions are placed in an set named "PowerSwitch". The dynamic variable should be the '[Job.JobState]' as $arg1 and contains the '[Stats.ICCProfile]', which was read before (at the start of file conversion from eps to tiff).
To simplify all this, I'll reduce to a 4-step flow:
1. 'in' folder
2. 'read' folder (which sets the '[Job.JobState]' to [Stats.ICCProfile]
3. photoshop configurator named 'save_eps_as_tiff' ('open' automatically, 'command' use script 'add_icc_profile.sscript', 'parameter1' = [Job.JobState], 'save as' TIFF, no compression, embedd icc profile YES)
4. 'out' folder
At the moment my 'add_icc_profile.sscript' looks like that, but it doesn't run (error message: 'function not available in photoshop' and "syntax error in line 90'):
function jobArrived( s : Switch, job : Job )
{
app.doAction ($arg1,"PowerSwitch");
}
Instead of using the script only to start the different photoshop actions, it should be more effective to tag the icc profile directly in the script. Perhaps there is a way, to
1. open incoming files (in my case tiff only) with photoshop
2. directly use scripting to tag an icc profile, who's name is defined by the [Job.JobState] (which is similar to the [Stats.ICCProfile] of the original file format read before)
3. save it as 'tiff' with embedded icc profile, without compression into the only outgoing connection
How to realize that?
Thanks in advance,
Thomas
I'm trying to create a script for the photoshop configurator, which attachs dynamically an icc profile to an incoming tiff file (without icc profile). Unfortunately my scripting knowledge is very poor, so I tried to use the script just to call different photoshop actions (which defines the icc profile to tag). The photoshop actions are placed in an set named "PowerSwitch". The dynamic variable should be the '[Job.JobState]' as $arg1 and contains the '[Stats.ICCProfile]', which was read before (at the start of file conversion from eps to tiff).
To simplify all this, I'll reduce to a 4-step flow:
1. 'in' folder
2. 'read' folder (which sets the '[Job.JobState]' to [Stats.ICCProfile]
3. photoshop configurator named 'save_eps_as_tiff' ('open' automatically, 'command' use script 'add_icc_profile.sscript', 'parameter1' = [Job.JobState], 'save as' TIFF, no compression, embedd icc profile YES)
4. 'out' folder
At the moment my 'add_icc_profile.sscript' looks like that, but it doesn't run (error message: 'function not available in photoshop' and "syntax error in line 90'):
function jobArrived( s : Switch, job : Job )
{
app.doAction ($arg1,"PowerSwitch");
}
Instead of using the script only to start the different photoshop actions, it should be more effective to tag the icc profile directly in the script. Perhaps there is a way, to
1. open incoming files (in my case tiff only) with photoshop
2. directly use scripting to tag an icc profile, who's name is defined by the [Job.JobState] (which is similar to the [Stats.ICCProfile] of the original file format read before)
3. save it as 'tiff' with embedded icc profile, without compression into the only outgoing connection
How to realize that?
Thanks in advance,
Thomas