diff --git a/src/ImageSharp/Advanced/AotCompilerTools.cs b/src/ImageSharp/Advanced/AotCompilerTools.cs index a0f70e640c..284fc2b53d 100644 --- a/src/ImageSharp/Advanced/AotCompilerTools.cs +++ b/src/ImageSharp/Advanced/AotCompilerTools.cs @@ -273,7 +273,7 @@ internal static class AotCompilerTools [Preserve] private static void AotCompileImageEncoder() where TPixel : unmanaged, IPixel - where TEncoder : IImageEncoder + where TEncoder : class, IImageEncoder { default(TEncoder).Encode(default, default); default(TEncoder).EncodeAsync(default, default, default); @@ -287,7 +287,7 @@ internal static class AotCompilerTools [Preserve] private static void AotCompileImageDecoder() where TPixel : unmanaged, IPixel - where TDecoder : IImageDecoder + where TDecoder : class, IImageDecoder => default(TDecoder).Decode(default, default); ///