'How can i save to clipboard an image in base64?

I'm trying to save to clipboard an image in base64. But i can't find methods to do it. I can get the base64 string and save it, but not an Image :

public void GetUrl(ExportEventArgs Args) 
    { 
        string dataURL = Args.DataUrl;
        //byte[] bytes = Convert.FromBase64String(dataURL);  

        //System.Drawing.Image image;
        //using (MemoryStream ms = new MemoryStream(bytes))
        //{
        //    image = System.Drawing.Image.FromStream(ms);
        //}
        Clipboard.SetTextAsync(dataURL);
    }

I'm using .NET MAUI Blazor and the Clipboard class is Microsoft.Maui.ApplicationModel.DataTransfer.Clipboard but i can't find how do it.

Thanks :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source