Please add the option for ImageFill(arraybuffer)

Please add support for arraybuffers to ImageFill.

I.e., have an ImageFill take what it already takes (file handle or “data:” URI) and add arraybuffer to the possible inputs.

Then you could fetch a binary URL (e.g., an image) and build an ImageFill in two steps, instead of first converting the arraybuffer to a “data:” URI using an external library.

Of, of course, the main advantage here besides simplicity is speed: doing this would avoid two whole encoding/decoding steps. For large images, this is significant.

Thanks.

Thanks for your feedback. We will discuss this feature request based on the order of # of votes.

Understood.

To me it’s a no-brainer, because it’s side-stepping the base64 decoding, and not really a whole new API…

But I realize you have limited resources, so I’ll shut up now. :wink:

You don’t need to convert to base64 – you can write the image to disk in a temp location and then load that directly into an XD ImageFill object. For large images, that is probably faster than dealing with base64 (and you don’t need any extra libraries to do encoding, either).

I know that’s still a little clumsier than the ideal, but there’s some great sample code here that should help: https://adobexdplatform.com/plugin-docs/tutorials/how-to-make-network-requests/

1 Like

Yes, I realize that quite well, but want to skip the whole write-to-disk and load-from-disk cycle, which seems mighty wasteful.