Copy link to clipboard
Copied
Hi
I'm trying to script the creation of a document and defining the bit depth based on a tick box in my UI however i keep getting en error
BitsPerChannelType.EIGHT
BitsPerChannelType.SIXTEEN
BitsPerChannelType.THIRTYTWO
all give me the same error, does this element just not work from the dom?
app.documents.add(
1920, // Width
1080, // Height
72, // Resolution
"Test Document", // Name
NewDocumentMode.RGB, // Mode
BitsPerChannelType.THIRTYTWO // Bit Depth
);
Copy link to clipboard
Copied
Pick this apart:
app.documents.add(UnitValue(800, "px"), // width
UnitValue(600, "px"), // height
72, // resolution
"test", // name
NewDocumentMode.RGB, // mode
DocumentFill.WHITE, // initialFill
1, // pixelAspectRatio
BitsPerChannelType.THIRTYTWO, // bitsPerChannel
"sRGB IEC61966-2.1"); // colorProfileName
https://theiviaxx.github.io/photoshop-docs/Photoshop/Documents/add.html#documents-add
Copy link to clipboard
Copied
Hi thanks for getting back to me
Im new to scripting so still trying to get my head around it all, i found the website you shared too but i still can't impliment it.
I tried running your code and it fails
Copy link to clipboard
Copied
Strange, the code worked fine for me which is why I posted it.
Beyond DOM code, one could use AM code.