diff --git a/src/ImageProcessorCore/ImageExtensions.cs b/src/ImageProcessorCore/ImageExtensions.cs index 7edb5aaa5d..aa10a2b08e 100644 --- a/src/ImageProcessorCore/ImageExtensions.cs +++ b/src/ImageProcessorCore/ImageExtensions.cs @@ -10,7 +10,6 @@ namespace ImageProcessorCore using Formats; - using ImageProcessorCore.Quantizers; using ImageProcessorCore.Samplers; /// @@ -52,21 +51,6 @@ namespace ImageProcessorCore /// Thrown if the stream is null. public static void SaveAsGif(this ImageBase source, Stream stream, int quality = 256) => new GifEncoder { Quality = quality }.Encode(source, stream); - /// - /// Returns a Base64 encoded string from the given image. - /// - /// The image this method extends. - /// The - public static string ToBase64String(this Image source) - { - using (MemoryStream stream = new MemoryStream()) - { - source.Save(stream); - stream.Flush(); - return $"data:{source.CurrentImageFormat.Encoder.MimeType};base64,{Convert.ToBase64String(stream.ToArray())}"; - } - } - /// /// Applies the collection of processors to the image. /// This method does not resize the target image. diff --git a/src/ImageProcessorCore/project.json b/src/ImageProcessorCore/project.json index 3f0cef1a69..7a6913f70e 100644 --- a/src/ImageProcessorCore/project.json +++ b/src/ImageProcessorCore/project.json @@ -23,7 +23,6 @@ "System.Runtime.Extensions": "4.0.11-beta-23516", "System.Reflection": "4.1.0-beta-23516", "System.IO": "4.0.11-beta-23516", - "StyleCop.Analyzers": "1.0.0", "Microsoft.NETCore": "5.0.1-beta-23516", "Microsoft.NETCore.Platforms": "1.0.1-beta-23516" },