Copy link to clipboard
Copied
Hi there,
If you read the help you will see which script to use to do what you want to do. The script names may also give you a clue.
Copy link to clipboard
Copied
Which script, there are a few of them...
Copy link to clipboard
Copied
hi, JJMack's PhotoCollageToolkit, the BatchReplaceOneObject script - same as the Original problem in this thread
Copy link to clipboard
Copied
I have tried in both 2021 and 2022 versions, with legacay save as turned on and off, and in all four cases, no error was generated (Mac OS Big Sur 11.6.5) and JPEG files were saved.
Are you on an M1 Mac?
What happens if you also check the box to save PSD files, do you get those or does the script fail before the PSD?
As the JPEG function looks pretty standard, it could be replaced with Save for Web or Script Listener code to see if that made any difference.
Copy link to clipboard
Copied
Let's see how the File > Export > Save for Web (Legacy) code works for you. Note: There is a 8,192 px width or height limit with this legacy export method.
Change the original three instances of lines 583, 586, 588 from:
exportInfo.jpegQuality = 8;
To the following save for web quality values:
exportInfo.jpegQuality = 80;
Then replace the original code block lines 542-551 from this:
function SaveAsJPEG(saveFile, jpegQuality) {
var doc = activeDocument;
if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) doc.bitsPerChannel = BitsPerChannelType.EIGHT;
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality;
activeDocument.saveAs(File(saveFile + ".jpg"), jpgSaveOptions, true, Extension.LOWERCASE);
}
To these save for web options:
function SaveAsJPEG(saveFile, jpegQuality) {
var doc = activeDocument;
if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) doc.bitsPerChannel = BitsPerChannelType.EIGHT;
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.JPEG;
sfwOptions.includeProfile = true;
sfwOptions.interlaced = 0;
sfwOptions.optimized = true;
sfwOptions.quality = jpegQuality;
doc.exportDocument(File(saveFile + ".jpg"), ExportType.SAVEFORWEB, sfwOptions);
}
Let me know how you go...
Copy link to clipboard
Copied
Just wanted to mention that I tried this fix for the issue in the main post and it did not work. It failed here for me
"oc.exportDocument(File(saveFile + ".jpg"), ExportType.SAVEFORWEB, sfwOptions);"
This is what im running.
I am on Photoshop CC 23.5
Copy link to clipboard
Copied
Just wanted to follow up as I am having the same issue with JJMack's PhotoCollageToolkit on Mac Specificaly. It works great on windows which is my current solution.
I have tried only tried the 2023 versions with the option for legacay save turned on and off and have had no luck in getting this to work with my macs. Currently I am running masOS Monterey 12.4. and my Mac does have a M1 Chip.
I have also have tried the save for web option for the jpegs but have run into this error.
which is for this line of code:
doc.exportDocument(File(saveFile + ".jpg"), ExportType.SAVEFORWEB, sfwOptions);
Any help on a possible solution or workaround would be greatly appriciated!
Copy link to clipboard
Copied
Which script exactly?
I can only test on an Intel chip running Monterey.
Copy link to clipboard
Copied
Hey @Stephen_A_Marsh ,
Thanks for the reply looks like the reply got burried in my notifications. The script specfically I am having issues with is the BatchReplaceOneObject.jsx
Copy link to clipboard
Copied
Hi, i think that you have already solved the problem. But i want to inform other people who may have the same problem. You need to check all your layers and make sure they are all unlocked! Olny after that you can easily safe/export the Artboards to PDF/FILE etc.
Hope this helps someone))
Good day.
Copy link to clipboard
Copied
Does anyone need in this thread to export Artboards?