diff --git a/samples/ImageSharp.Web.Sample/Pages/Index.cshtml b/samples/ImageSharp.Web.Sample/Pages/Index.cshtml index d201272..ec9405c 100644 --- a/samples/ImageSharp.Web.Sample/Pages/Index.cshtml +++ b/samples/ImageSharp.Web.Sample/Pages/Index.cshtml @@ -125,20 +125,23 @@
+ Demonstrates that ICC Profiles are converted to sRGB by default ensuring correct display of images with embedded profiles. +
- issue_2723.jpg?width=2000
+ issue_2723.jpg?width=1000
-
+
- issue_2723.jpg?width=2000&format=webp
+ issue_2723.jpg?width=1000&format=webp
-
+
Demonstrates that by default EXIF orientation is normalized enabling correct display of WEBP images.
+
+ Exif5-1x.webp?width=128
+
+
+
Demonstrates that the middleware handles EXIF orientation correctly for portrait images.
diff --git a/samples/ImageSharp.Web.Sample/wwwroot/Exif5-1x.webp b/samples/ImageSharp.Web.Sample/wwwroot/Exif5-1x.webp new file mode 100644 index 0000000..76355e8 --- /dev/null +++ b/samples/ImageSharp.Web.Sample/wwwroot/Exif5-1x.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:299e46b87c867b8ba2f654831c96e9ced0a9801a5162f810e353d05cd6eb0568 +size 1086 diff --git a/src/ImageSharp.Web/Middleware/ImageSharpMiddlewareOptions.cs b/src/ImageSharp.Web/Middleware/ImageSharpMiddlewareOptions.cs index 2cc85bc..8c5382e 100644 --- a/src/ImageSharp.Web/Middleware/ImageSharpMiddlewareOptions.cs +++ b/src/ImageSharp.Web/Middleware/ImageSharpMiddlewareOptions.cs @@ -9,6 +9,7 @@ using SixLabors.ImageSharp.Formats.Png; using SixLabors.ImageSharp.Formats.Webp; using SixLabors.ImageSharp.Web.Commands; +using SixLabors.ImageSharp.Web.Processors; using SixLabors.ImageSharp.Web.Providers; namespace SixLabors.ImageSharp.Web.Middleware; @@ -31,7 +32,20 @@ public class ImageSharpMiddlewareOptions return HMACUtilities.ComputeHMACSHA256(uri, secret); }; - private Func