From 5de379a908dac7336c6523215da06a64c7ef7948 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sat, 18 Apr 2020 16:54:33 +0100 Subject: [PATCH] Update ImageExtensions.cs --- src/ImageSharp/ImageExtensions.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/ImageExtensions.cs b/src/ImageSharp/ImageExtensions.cs index 0bdbcc4ab..62ac449b7 100644 --- a/src/ImageSharp/ImageExtensions.cs +++ b/src/ImageSharp/ImageExtensions.cs @@ -103,14 +103,18 @@ namespace SixLabors.ImageSharp /// /// Returns a Base64 encoded string from the given image. + /// The result is prepended with a Data URI + /// + /// + /// For example: + /// + /// + /// /// - /// - /// The pixel format. /// The source image /// The format. /// The - public static string ToBase64String(this Image source, IImageFormat format) - where TPixel : unmanaged, IPixel + public static string ToBase64String(this Image source, IImageFormat format) { using var stream = new MemoryStream(); source.Save(stream, format);