@stavros Don’t get mad if you don’t get help. The Adobe folks here are helpful but busy, and others try to help but are also completely consumed with our own work, and generally can only help if your question is something they’ve already encountered and can answer fairly simply.
I agree, though, that there should be a simple way to get the bits from an ImageFill as an arrayBuffer (just like there should be a way to turn arrayBuffers into an ImageFill without going through base64 encoding/decoding), with enough information to interpret the arrayBuffer structure.
No problem–just didn’t want you to think people aren’t trying…
XD extensibility is pretty young still, and there are lots of missing pieces. I’d give Adobe time, though–they’re moving very quickly in all the right directions.
Apologies for the delay, @Stavros… the same Adobe people who participate in this forum are the same people building XD and UXP, so there’s not always time in our day to craft a response. Apologies, though, that you felt ignored – that’s certainly not the intent!
For working with the actual pixels – there’s no easy way, unfortunately. IIRC, plugins that have done that will use an npm package that can parse the PNG or JPG file format and then operate on the pixels that way. You might try this one: https://www.npmjs.com/package/pngparse
We’re working on improving this in upcoming releases, but for now, the easy answer is that there is no easy answer.
const arraybuffer = await erg[0].outputFile.read({ format
: require('uxp').storage.formats.binary});
^
Plugin SyntaxError: await is only valid in async function
Am I missing something ? Every method has the await keyword in.
We are developing plugin for XD, we used server side process to solve the issue with caves as you mentioned here. It is slow and we are looking into other options without server side.
Has your team solved the issue that you mentioned is in your backlog?
Any hint or idea that applying filter can be done local within Adobe is appreciated.
We’re working on an Imaging API that will make this much easier, but for this type of functionality, it’s likely we won’t see it in XD until 2022 (earlier rather than later, I hope). For now, slow is the only path.