Skip to main content
Known Participant
March 2, 2009
Question

how to solve the Embed Color Profile problem...

  • March 2, 2009
  • 7 replies
  • 1791 views
Hi Everyone,
This vijay from Chennai. I have one doubt for rectify the Embed color Profile problem, that's is how can i judges whether the file had Embed Color Profile or not. anyone solve this problem.
Thanks in Advance.

-yajiv
This topic has been closed for replies.

7 replies

c.pfaffenbichler
Community Expert
Community Expert
March 5, 2009
So it did »support the property or method 'colorProfileName'« after all?
_thailu_Author
Known Participant
March 5, 2009
Thanks for all Dudes....
i solve that problem.
Thanks christoph pfaffenbichler.
Thank god..
Known Participant
March 5, 2009
Can you not just test for a profile name string in a try block on success set the profile kind to none on failure it was not managed? Sorry don't know how the syntax for this in JavaScript.

tell application "Adobe Photoshop CS2"
activate
tell document 1
try
set Doc_Profile to color profile name
set color profile kind to none
on error
display dialog "Not managed"
end try
end tell
end tell
_thailu_Author
Known Participant
March 5, 2009
sorry dude
this is code not working.the error msg show on below...
"Object does not support the property or method 'colorProfileName'"

can you solve that error MSG.

-yajiv
c.pfaffenbichler
Community Expert
Community Expert
March 5, 2009
I used another profiles name, because I dont have the old one installed anymore, Youll have to be exact about the letters though.
And from a prepress-standpoint Id like to point out that removing the profile as opposed to »Convert to Profile« seems a peculiar practice, though of course Your reasons for doing so may be valid indeed.
You could try:
var myDocument = app.activeDocument;
if (myDocument.colorProfileName == "U.S. Web Coated (SWOP) v2") {
// =======================================================
var idassignProfile = stringIDToTypeID( "assignProfile" );
var desc2 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1 = new ActionReference();
var idDcmn = charIDToTypeID( "Dcmn" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref1.putEnumerated( idDcmn, idOrdn, idTrgt );
desc2.putReference( idnull, ref1 );
var idmanage = stringIDToTypeID( "manage" );
desc2.putBoolean( idmanage, false );
executeAction( idassignProfile, desc2, DialogModes.NO );
}
else {
};
_thailu_Author
Known Participant
March 5, 2009
Sorry dude..

Actually My Question is How can i check weather the file has include embedded color profile or not.
(ie.. the file has embedded color Profile : U.S Web coated(SWOP))
if the file having embedded color profile then remove the embedded color profile.

Thanks in Advance.

-yajiv
c.pfaffenbichler
Community Expert
Community Expert
March 4, 2009
Im not quite sure I understand Your question completely, but the best I could come up with for checking if a profile is embedded in a file is a try-clause (which is bad form):

var myDocument = app.activeDocument;
try {
myDocument.colorProfileName;
alert ("profile embedded\n" + myDocument.colorProfileName)
}
catch (e) {
alert ("no profile embedded")
};

Hopefully one of the more experienced scripters will chime in.