@samgannaway has updated the Photoshop documentation with the following:
The Imaging API … will enable UXP plugins/scripts to get and set pixel data into directly into layers and masks (and even selections in a way). We are considering these functions to be properly “beta” in that we are hoping to receive feedback before we cement them. In fact, access to them is via an “imaging_beta” property to drive home the point:
It’s super exciting to see UXP develop beyond ExtendScript’s capabilities!
One suggestion that I have is to consider support for putting raw pixel data, i.e. support for image data without color profile. That would require PhotoshopImageData to represent such a state. This would support the use-case in which Photoshop’s color management is disabled (via Edit > Assign Profile). This is actually pretty common in environments where ICC profiles are not widely used anymore in the pipeline (notably VFX pipelines relying on OpenColorIO).
Another minor point is the use of the term “color space” to refer to RGB, Grayscale, Lab etc. I would argue that this should rather be “color model” (in the GUI actually referred to as color mode). (i.e. sRGB or Linear RGB are both color spaces for the RGB color model). I know this sounds like a nit-picky note and the two terms are sometimes (unfortunately) used interchangeably in literature, but since this API is brand new there’s a chance here to do it right and future proof
layer.name works fine, but layer.textItem shows up in the debugger as “undefined.” And in the debugger, if I plow down into the properties, textItem doesn’t show up at all, which is consistent with undefined.
I’m trying the “imaging -test” plugin, I noticed that on pc the execution is very slow. I tried the desaturation function, on two different PCs and on a Mac. there is a noticeable performance difference, it is about 10-15 times slower on pc. i think there is a bug.