Copy link to clipboard
Copied
Is there a way to get Photoshop to stop asking to merge or don't merge when chaging color modes?
Here is a combined version of the previous 3 separate scripts, using a single interface to select the colour mode:
// Attention: Changing modes without flattening may lead to unexpected results!
#target photoshop
// Function to convert string to type ID
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
// Function to convert color mode
function convertColorMode(mode) {
var descriptor = new ActionDescriptor();
descriptor.putClass(s2t("to"), s2t(mode));
descriptor.pu
...
Copy link to clipboard
Copied
No.
Layered files usually contain adjustment layers. Any numerical adjustment is color space specific, and when you're talking changing modes, the adjustment most likely doesn't even make any sense at all.
So your choice is to flatten to maintain appearance - which is what in most cases is wanted - or discard the adjustment layers altogether, sending you back to start. Few people want that.
Copy link to clipboard
Copied
Thank you. Adjustment layers are not a concern.
I am stylizing a bunch of photos which requires changing modes twice, and it keeps asking me to merge or not, for every photo, and the answer is always Do Not Merge. So annoying! I wish there was a preference I could set for Do No Ask.
Copy link to clipboard
Copied
It’s not just adjustment layers, blend modes for any layer may result in a different visual result as is common for CMYK colour mode or the blend mode may not even be available as is the case for many blend modes in Lab colour mode.
If you are simply using the Image > Mode menu and not Convert to Profile, the following scripts can be used to change modes without the warning:
Image > Mode > CMYK
#target photoshop
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
descriptor.putClass(s2t("to"), s2t("CMYKColorMode"));
descriptor.putBoolean(s2t("flatten"), false);
descriptor.putBoolean(s2t("rasterize"), false);
executeAction(s2t("convertMode"), descriptor, DialogModes.NO);
Image > Mode > RGB
#target photoshop
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
descriptor.putClass(s2t("to"), s2t("RGBColorMode"));
descriptor.putBoolean(s2t("flatten"), false);
descriptor.putBoolean(s2t("rasterize"), false);
executeAction(s2t("convertMode"), descriptor, DialogModes.NO);
Image > Mode > Lab
#target photoshop
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
descriptor.putClass(s2t("to"), s2t("labColorMode"));
descriptor.putBoolean(s2t("flatten"), false);
descriptor.putBoolean(s2t("rasterize"), false);
executeAction(s2t("convertMode"), descriptor, DialogModes.NO);
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Here is a combined version of the previous 3 separate scripts, using a single interface to select the colour mode:
// Attention: Changing modes without flattening may lead to unexpected results!
#target photoshop
// Function to convert string to type ID
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
// Function to convert color mode
function convertColorMode(mode) {
var descriptor = new ActionDescriptor();
descriptor.putClass(s2t("to"), s2t(mode));
descriptor.putBoolean(s2t("flatten"), false);
descriptor.putBoolean(s2t("rasterize"), false);
executeAction(s2t("convertMode"), descriptor, DialogModes.NO);
}
// Create the dialog
var dialog = new Window("dialog", "Convert Color Mode (Without Flatten Prompt)");
dialog.orientation = "column";
dialog.alignChildren = ["fill", "top"];
dialog.preferredSize = [400, -1]; // Set the preferred width to 400px, height will adjust automatically
// Panel group with dropdown menu
var panelGroup = dialog.add("panel", undefined, "Select Color Mode");
panelGroup.orientation = "column";
panelGroup.alignChildren = ["fill", "top"];
var dropdown = panelGroup.add("dropdownlist", undefined, ["CMYK", "RGB", "Lab"]);
dropdown.selection = 0;
// Cancel and OK buttons
var buttonGroup = dialog.add("group");
buttonGroup.orientation = "row";
buttonGroup.alignment = "right";
var cancelButton = buttonGroup.add("button", undefined, "Cancel", { name: "cancel" });
var okButton = buttonGroup.add("button", undefined, "OK", { name: "ok" });
// OK button event handler
okButton.onClick = function () {
var selectedMode = dropdown.selection.text;
var mode;
switch (selectedMode) {
case "CMYK":
mode = "CMYKColorMode";
break;
case "RGB":
mode = "RGBColorMode";
break;
case "Lab":
mode = "labColorMode";
break;
}
convertColorMode(mode);
dialog.close();
};
// Cancel button event handler
cancelButton.onClick = function () {
dialog.close();
};
// Show the dialog
dialog.show();
Copy link to clipboard
Copied
thank you!
Copy link to clipboard
Copied
thank you!
By @Herbie22012266fjw7
You're welcome, please come back and mark my post as a correct answer if it solved your issue, or provide further feedback if it didn't.