Web - Custom Widget - Downloading (empty) image

Hi,

I am trying to build a custom widget to compose an image from multiple images loaded from URLs and allow users to download this composed image by tapping on it. While the composed image displays correctly within the custom widget, the downloaded file only shows a black image instead of the expected composed image.

Here's a simplified version of my code:

https://codefile.io/f/Gq6zRpHvRE

I've tried multiple ways to download the image, but it always shows black..

When I draw a blue square on the canvas, then the download image contains the blue square!

I'm at a loss... The discrepancy between the widget's display and the downloaded image is puzzling me.

Could anyone share insights or similar experiences regarding this issue? What steps can I take to ensure the downloaded image matches the composite image shown in the widget?

I'd greatly appreciate any advice or suggestions. Thanks so much for your support!


1
2 replies