From 1000dfbd8ddf0572545f0375bae091ce055796a5 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Tue, 17 Aug 2021 18:12:55 +0200 Subject: [PATCH] Add NotSupportedException to the Image.Load FromStream overload documentation --- src/ImageSharp/Image.FromStream.cs | 51 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/ImageSharp/Image.FromStream.cs b/src/ImageSharp/Image.FromStream.cs index b57fa9a6ca..3dde8e77bc 100644 --- a/src/ImageSharp/Image.FromStream.cs +++ b/src/ImageSharp/Image.FromStream.cs @@ -9,7 +9,6 @@ using System.Threading; using System.Threading.Tasks; using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.IO; -using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; namespace SixLabors.ImageSharp @@ -216,7 +215,7 @@ namespace SixLabors.ImageSharp /// The stream containing image information. /// The format type of the decoded image. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The . @@ -229,7 +228,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -242,7 +241,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The . @@ -254,7 +253,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -268,7 +267,7 @@ namespace SixLabors.ImageSharp /// The decoder. /// The stream is null. /// The decoder is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The . @@ -283,7 +282,7 @@ namespace SixLabors.ImageSharp /// The decoder. /// The stream is null. /// The decoder is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -300,7 +299,7 @@ namespace SixLabors.ImageSharp /// The configuration is null. /// The stream is null. /// The decoder is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A new . @@ -321,7 +320,7 @@ namespace SixLabors.ImageSharp /// The configuration is null. /// The stream is null. /// The decoder is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -346,7 +345,7 @@ namespace SixLabors.ImageSharp /// The stream containing image information. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A new . @@ -360,7 +359,7 @@ namespace SixLabors.ImageSharp /// The token to monitor for cancellation requests. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -376,7 +375,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -390,7 +389,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -405,7 +404,7 @@ namespace SixLabors.ImageSharp /// The stream containing image information. /// The format type of the decoded image. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -419,7 +418,7 @@ namespace SixLabors.ImageSharp /// /// The stream containing image information. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -434,7 +433,7 @@ namespace SixLabors.ImageSharp /// The stream containing image information. /// The decoder. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -450,7 +449,7 @@ namespace SixLabors.ImageSharp /// The decoder. /// The token to monitor for cancellation requests. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -471,7 +470,7 @@ namespace SixLabors.ImageSharp /// The decoder. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -489,7 +488,7 @@ namespace SixLabors.ImageSharp /// The token to monitor for cancellation requests. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -513,7 +512,7 @@ namespace SixLabors.ImageSharp /// The stream containing image information. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -530,7 +529,7 @@ namespace SixLabors.ImageSharp /// The format type of the decoded image. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -566,7 +565,7 @@ namespace SixLabors.ImageSharp /// The token to monitor for cancellation requests. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A representing the asynchronous operation. @@ -606,7 +605,7 @@ namespace SixLabors.ImageSharp /// The token to monitor for cancellation requests. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -649,7 +648,7 @@ namespace SixLabors.ImageSharp /// The token to monitor for cancellation requests. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// The pixel format. @@ -674,7 +673,7 @@ namespace SixLabors.ImageSharp /// The format type of the decoded image. /// The configuration is null. /// The stream is null. - /// The stream is not readable. + /// The stream is not readable or the image format is not supported. /// Image format not recognised. /// Image contains invalid content. /// A new . @@ -763,7 +762,7 @@ namespace SixLabors.ImageSharp } // To make sure we don't trigger anything with aspnetcore then we just need to make sure we are - // seekable and we make the copy using CopyToAsync if the stream is seekable then we arn't using + // seekable and we make the copy using CopyToAsync if the stream is seekable then we aren't using // one of the aspnetcore wrapped streams that error on sync api calls and we can use it without // having to further wrap if (stream.CanSeek)