Shayton Equilibrium Kitchen Utensil 2003 User Manual

Page of 194
MediaScript Objects and Methods 159 
• 
• 
• 
Example
The following code creates an IccProfile object using the “USWebCoatedSWOP.icc” profile 
and then closes the file:
#link "IccProfile.dll"
var prof = new IccProfile("USWebCoatedSWOP.icc");
prof.close();
IccProfile.dll
The following code returns text describing every available CMYK profile:
#link "IccProfile.dll"
#include "sys:/TextResponse.ms"
function main()
{
    var txt = new TextResponse();
    var profs = IccProfile.list(IccProfile.CMYK, IccProfile.UNKNOWN);
    for (var i = 0; i < profs.length; ++i)
    {
        txt.append(profs[i] + "\n");
        var currProf = new IccProfile(profs[i]);
        txt.append("  name: " + currProf.getName() + "\n");
        txt.append("  path: " + currProf.getPath() + "\n");
        txt.append("  class: " + currProf.getClass() + "\n");
        txt.append("  colorspace: " + currProf.getColorspace() + "\n");
        txt.append("  connectionspace: " + 
currProf.getConnectionspace() + "\n");
        currProf.close();
    }
    resp.setObject(txt, RespType.Streamed);
}