• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

doc.convertProfile does nothing

Participant ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

Hi guys I am trying to convert color profile to "Adobe RGB (1998)", running 

doc.convertProfile("Adobe RGB (1998)", Intent.RELATIVECOLORIMETRIC, true, true);

it doesn't seem to change anything

however running 

doc.colorProfileName = "Adobe RGB (1998)"

changes visially colours of the image, but the color settings menu still show old color space profile:
Screenshot 2023-04-11 at 13.39.59.png


TOPICS
Actions and scripting , macOS

Views

365

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 11, 2023 Apr 11, 2023

@Evgenii Eth 

 

Try:

 

activeDocument.convertProfile("Adobe RGB (1998)", Intent.RELATIVECOLORIMETRIC, true, true);

 

However, from your assign test, it sounds like you have correctly declared the doc variable (even if you didn't post it in your code sample).

 

The code is valid at the active document level, not at the parent application level.

 

Set your staus bar at the lower left to show the doc profile, as convert to profile shouldn't show a visual change in many cases for RGB files:

 

status-profile.png

 

https://theiviaxx.github.io/photoshop-docs/Photoshop/Document/convertProfile.html

...

Votes

Translate

Translate
Adobe
LEGEND ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

You are misunderstanding several points, and would see the same (correct) results if using Assign profile vs Convert to profile in the user interface.
1. Converting to a new profile is not supposed to change the appearance - that is the whole point. The appearance changes only if there are gamut limitations.
2. Appearance changes when you assign a profile, unless it is effectively identical for the colours used. 3. The preferences you post are the default, to be used in a new document, and to be checked on opening (optional). They have nothing to do with the assigned or converted profile in the current document, and are not changed. 
4. You can check the assigned profile using the option in the status bar at the bottom of the image. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

@Evgenii Eth 

 

Try:

 

activeDocument.convertProfile("Adobe RGB (1998)", Intent.RELATIVECOLORIMETRIC, true, true);

 

However, from your assign test, it sounds like you have correctly declared the doc variable (even if you didn't post it in your code sample).

 

The code is valid at the active document level, not at the parent application level.

 

Set your staus bar at the lower left to show the doc profile, as convert to profile shouldn't show a visual change in many cases for RGB files:

 

status-profile.png

 

https://theiviaxx.github.io/photoshop-docs/Photoshop/Document/convertProfile.html

 

https://theiviaxx.github.io/photoshop-docs/Photoshop/Application/colorSettings.html

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

Screenshot 2023-04-11 at 22.18.56.png

Yes doc is set to active doc, I have set the profile in theleft bottom corner and it shows correct profile, but color settings don't

var doc = app.activeDocument;

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

>> it shows correct profile, but color settings don't << 

I'm sorry you did not read my reply. I repeat: "3. The preferences you post are the default, to be used in a new document, and to be checked on opening (optional). They have nothing to do with the assigned or converted profile in the current document, and are not changed. "

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

LATEST

@Evgenii Eth wrote:

I have set the profile in theleft bottom corner and it shows correct profile, but color settings don't


 

That is correct and expected behaviour. There is no reason for Color Settings to change. Why do you expect them to change?

 

Consider the Document Object Model (DOM). You are targeting the document when using the Convert or Assign commands – you are not targeting the application.

 

Just as when manually performing the tasks, scripting is the same – the document is being changed, not the application's Color Settings.

 

Colour management in Adobe software is designed to have document-level ICC profiles which are independent of the ICC profiles set in the application's Color Settings.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines