File input to allow creating in-painting mask, and downloading of the RGBA encoded PNG file. Alpha channel is used for mask (0=remove, 1=keep). RGB channel contains the existing image data.
leonmak/masked-image-png
React component to export RGBA PNG images using alpha channel preserving RGB data
TypeScript