Exporting with UXP with 32bit RGB errors

When using the activeDocument save as function, it works with RGB 8 and 16 bit. It seems to error (no error found or displayed in logs etc) when it is a 32bit. Interestingly if I save it as 32bit using PS itself and reopen it, it has become an 8-bit.

IS there a flag or a method I could use to convert 32bit to 8bit?


That could be an error in DOM. Can you send some code snippets to reproduce an issue?

This is used within executeasModal:
await activeDocument.saveAs.png(holdNewFile, true);

The activedocument has 32bit RGB modes selected.

1 Like

PS is unable to save PNG as 32bit per channel as PNG format itself does not support that. So currently you should check bits per channel yourself and adjust document accordingly. But it could be a good idea if PS would throw an error when it cannot save document according to the used options.


Thanks for your reply. What about JPG?

JPG has max bit depth 8. So it has to be converted to 8bit before saving. Unless saving itself would take care of it.