diff --git a/src/ImageSharp/Image.LoadPixelData.cs b/src/ImageSharp/Image.LoadPixelData.cs index 0179e62acc..5f85d61ba3 100644 --- a/src/ImageSharp/Image.LoadPixelData.cs +++ b/src/ImageSharp/Image.LoadPixelData.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp /// The height of the final image. /// The pixel format. /// A new . - private static Image LoadPixelData(Span data, int width, int height) + public static Image LoadPixelData(Span data, int width, int height) where TPixel : struct, IPixel => LoadPixelData(Configuration.Default, data, width, height); @@ -57,7 +57,7 @@ namespace SixLabors.ImageSharp /// The height of the final image. /// The pixel format. /// A new . - private static Image LoadPixelData(Span data, int width, int height) + public static Image LoadPixelData(Span data, int width, int height) where TPixel : struct, IPixel => LoadPixelData(Configuration.Default, data, width, height); @@ -83,7 +83,7 @@ namespace SixLabors.ImageSharp /// The height of the final image. /// The pixel format. /// A new . - private static Image LoadPixelData(Configuration config, Span data, int width, int height) + public static Image LoadPixelData(Configuration config, Span data, int width, int height) where TPixel : struct, IPixel => LoadPixelData(config, MemoryMarshal.Cast(data), width, height); @@ -111,7 +111,7 @@ namespace SixLabors.ImageSharp /// The height of the final image. /// The pixel format. /// A new . - private static Image LoadPixelData(Configuration config, Span data, int width, int height) + public static Image LoadPixelData(Configuration config, Span data, int width, int height) where TPixel : struct, IPixel { int count = width * height;