using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
namespace OpenMacroBoard.SDK
{
///
/// Extension methods for .
///
public static class KeyBitmapDataAccessExtensions
{
///
/// Creates a new for this .
///
///
///
/// Keep in mind that this operation allocates and creates a copy under the hood.
///
///
public static Image ToImage(this IKeyBitmapDataAccess dataAccess)
{
return Image.LoadPixelData(dataAccess.GetData(), dataAccess.Width, dataAccess.Height);
}
}
}