-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
For cloud applications we need to convert a Bitmap to byte[] to save into blob storage.
This requires interacting with System.Drawing.Common, which means taking that dependency on in the cloud app.
The Plot module should have a GetBitmapBytes() that lets you specify file format type, preventing the need to pass Bitmap objects around in the cloud
public static byte[] GetBytesPng(System.Drawing.Bitmap bmp)
{
using MemoryStream stream = new();
bmp.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
return stream.ToArray();
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels