diff --git a/src/ImageSharp/ImageExtensions.cs b/src/ImageSharp/ImageExtensions.cs
index 9f9a7e57a..192287ba5 100644
--- a/src/ImageSharp/ImageExtensions.cs
+++ b/src/ImageSharp/ImageExtensions.cs
@@ -4,13 +4,11 @@
using System;
using System.Collections.Generic;
using System.IO;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.Primitives;
namespace SixLabors.ImageSharp
{
@@ -198,24 +196,24 @@ namespace SixLabors.ImageSharp
}
///
- /// Saves the raw image to the given bytes.
+ /// Saves the raw image to the given byte buffer.
///
/// The Pixel format.
/// The source image
/// The buffer to save the raw pixel data to.
/// Thrown if the stream is null.
- internal static void SavePixelData(this Image source, Span buffer)
+ public static void SavePixelData(this Image source, Span buffer)
where TPixel : struct, IPixel
=> source.Frames.RootFrame.SavePixelData(MemoryMarshal.Cast(buffer));
///
- /// Saves the raw image to the given bytes.
+ /// Saves the raw image to the given byte buffer.
///
/// The Pixel format.
/// The source image
/// The buffer to save the raw pixel data to.
/// Thrown if the stream is null.
- internal static void SavePixelData(this ImageFrame source, Span buffer)
+ public static void SavePixelData(this ImageFrame source, Span buffer)
where TPixel : struct, IPixel
{
Span sourceBuffer = source.GetPixelSpan();
@@ -224,4 +222,4 @@ namespace SixLabors.ImageSharp
sourceBuffer.CopyTo(buffer);
}
}
-}
+}
\ No newline at end of file