Highlighted

Photoshop CC Automated Actions Fail

New Here ,
Nov 27, 2019

Copy link to clipboard

Copied

I recorded a simple action to convert folders of images to CMYK, the action goes as follows:

 

1. convert to CMYK

2. save

3. close out of file

 

I use this action on a daily basis to convert large batches of images, and after upgrading to the latest update it no longer works. I get an error saying "Convert mode is not currently available". Yet if I manually do these steps to each image, it works just fine.

TOPICS
Bug

Views

125

Likes

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

Photoshop CC Automated Actions Fail

New Here ,
Nov 27, 2019

Copy link to clipboard

Copied

I recorded a simple action to convert folders of images to CMYK, the action goes as follows:

 

1. convert to CMYK

2. save

3. close out of file

 

I use this action on a daily basis to convert large batches of images, and after upgrading to the latest update it no longer works. I get an error saying "Convert mode is not currently available". Yet if I manually do these steps to each image, it works just fine.

TOPICS
Bug

Views

126

Likes

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
Nov 27, 2019 0
Adobe Community Professional ,
Nov 27, 2019

Copy link to clipboard

Copied

Moving to the Photoshop forum from Community Help

Likes

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
Reply
Loading...
Nov 27, 2019 0
Adobe Community Professional ,
Nov 27, 2019

Copy link to clipboard

Copied

I can not reproduce problem without more informations. Which version of Photoshop you are using? I am on Win running 21.0.1 version. Can you post screenshot with error message and Convert Mode step in action expanded. 

Likes

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
Reply
Loading...
Nov 27, 2019 0
New Here ,
Nov 27, 2019

Copy link to clipboard

Copied

Same version sadly, and I can't get it to work. I still have last year's release on my mac and it works just fine which leads me to believe this is an issue with the new update. I've attached screenshots of the issue.

Screen Shot 2019-11-27 at 11.52.10 AM.pngScreen Shot 2019-11-27 at 11.52.15 AM.png

Likes

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
Reply
Loading...
Nov 27, 2019 0
Adobe Community Professional ,
Nov 27, 2019

Copy link to clipboard

Copied

So the problem is when running Batch script, otherwise it works when playing action on its own? Can you upload action somewhere to test it?

Likes

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
Reply
Loading...
Nov 27, 2019 0
Adobe Community Professional ,
Nov 27, 2019

Copy link to clipboard

Copied

If your action does not have an open command step, you should not use the "override action open..." checkbox in the Batch interface.

Likes

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
Reply
Loading...
Nov 27, 2019 0
Adobe Community Professional ,
Nov 27, 2019

Copy link to clipboard

Copied

I modified the following script to do the same thing as your action/batch (convert to working CMYK and overwrite the original files, it is presumed that the input file formats are capable of being saved as CMYK):

 

 

 

//forums.adobe.com/thread/2593940
//forums.adobe.com/message/10926314#10926314
#target photoshop  
var inFolder = Folder.selectDialog("Select the input folder", "");
var inFiles = inFolder.getFiles();
app.displayDialogs = DialogModes.NO;

for (var a = 0; a < inFiles.length; a++) {
    try {
        var inDoc = open(inFiles[a]);
        inDoc.changeMode(ChangeMode.CMYK);
        inDoc.save();
        inDoc.close();
    } catch (e) {
        continue;
    }
};
alert("Input files converted to working space CMYK and saved with embedded ICC profile");

 

 

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Likes

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
Reply
Loading...
Nov 27, 2019 0
Participant ,
Nov 17, 2020

Copy link to clipboard

Copied

I know this is an old thread, but I'm trying to learn scripting for Ps and also getting exact same message

Karmalakas_0-1605628728096.png


Ps v22.0.1 on Win10
My script is:

var doc = app.activeDocument;
var indexedDoc = doc.duplicate('_tmpIndexed', true);


var indexedOptions = new IndexedConversionOptions();
indexedOptions.colors = 7;
/*indexedOptions.palette = Palette.LOCALSELECTIVE;
indexedOptions.forced = ForcedColors.NONE;
indexedOptions.transparency = false;
indexedOptions.dither = Dither.NONE;*/

indexedDoc.changeMode(ChangeMode.INDEXEDCOLOR, indexedOptions);


 Any insight?

Likes

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
Reply
Loading...
Nov 17, 2020 0
Adobe Community Professional ,
Nov 17, 2020

Copy link to clipboard

Copied

Just a guess, but is the doc in any other mode than RGB?

Likes

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
Reply
Loading...
Nov 17, 2020 0
Participant ,
Nov 17, 2020

Copy link to clipboard

Copied

It's AdobeRGB. Tried with RGB JPEG and your guess is valid - it does the thing. But how do I convert from AdobeRGB then? Executing

indexedDoc.changeMode(ChangeMode.RGB);

before INDEXEDCOLOR doesn't help 😞

Likes

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
Reply
Loading...
Nov 17, 2020 0
Adobe Community Professional ,
Nov 17, 2020

Copy link to clipboard

Copied

Your code works OK on my Mac (Mojave OS) and Photoshop 2019.

 

The duped file is in indexed mode, without any reported errors... The errors only show if the doc is not in RGB mode (in Photoshop, only RGB can be indexed, unlike in say Acrobat where other colour modes can be indexed).

 

I did note that it did not reduce down to 7 colours though. I had to uncomment indexedOptions.palette to get it to reduce colours.

 

The RGB mode change appears to be correct as well.

 

EDIT: I just tried and all works fine in Win 10 with Photoshop 2021 as well.

 

Likes

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
Reply
Loading...
Nov 17, 2020 0
Participant ,
Nov 17, 2020

Copy link to clipboard

Copied

You mean it converts from AdobeRGB?

Likes

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
Reply
Loading...
Nov 17, 2020 0
Adobe Community Professional ,
Nov 17, 2020

Copy link to clipboard

Copied

Yes, Indexed Colour does not care about the profile/space – it is just a subset of RGB mode in Photoshop.

 

If you wish to convert specifically to sRGB first:

 

app.activeDocument.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, false);

Likes

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
Reply
Loading...
Nov 17, 2020 0
Participant ,
Nov 18, 2020

Copy link to clipboard

Copied

Createt new document ProPhoto RGB (16bpc). Added few random color brush strokes. Running the script I pasted above, gives the error I pasted above 😞 Same if I add

indexedDoc.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, false);

just before converting to indexed 😕 

Likes

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
Reply
Loading...
Nov 18, 2020 0
Adobe Community Professional ,
Nov 18, 2020

Copy link to clipboard

Copied

I was working on 8-bpc data, when you mentioned 16-bpc that was the clue!

 

So add this before the indexed mode change:

 

 

indexedDoc.bitsPerChannel = BitsPerChannelType.EIGHT;

 

 

It doesn't matter if manually using the GUI, actions or scripting, the same base laws apply, in Photoshop indexed colour is created from RGB/8 data. In hindsight the other clue was the error mentioning mode, I was focused on colour mode, however bit depth also resides under mode as well!

 

And here is the code in full that works for me:

 

var doc = app.activeDocument;
var indexedDoc = doc.duplicate('_tmpIndexed', true);
var indexedOptions = new IndexedConversionOptions();
indexedOptions.colors = 7;
indexedOptions.palette = Palette.LOCALSELECTIVE;
/*indexedOptions.forced = ForcedColors.NONE;
indexedOptions.transparency = false;
indexedOptions.dither = Dither.NONE;*/
app.activeDocument.bitsPerChannel = BitsPerChannelType.EIGHT;
app.activeDocument.changeMode(ChangeMode.INDEXEDCOLOR, indexedOptions);

 

Likes

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
Reply
Loading...
Nov 18, 2020 1
Participant ,
Nov 22, 2020

Copy link to clipboard

Copied

Thank you 🙂 That worked
Sorry it took a bit to check and reply 🙂

Likes

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
Reply
Loading...
Nov 22, 2020 0