We added the Interop API which updates the dll search directory for .NET Framework to match behaviors in .NET5+. This means we no longer need to have explicit x86 vs x64 interop classes. They all reference the exact same assembly name. Let's remove the duplicate file but keep the native interop wrapper. See code snippet example below.
internal static IntPtr InitJpegEncoder(int quality)
{
switch (RuntimeInformation.ProcessArchitecture)
{
case Architecture.X64:
case Architecture.X86:
return native.encoder_jpeg_init(quality);
default:
throw new NotSupportedException($"Current platform ({RuntimeInformation.ProcessArchitecture}) is not supported");
}
}
Description
We added the
Interop
API which updates the dll search directory for .NET Framework to match behaviors in .NET5+. This means we no longer need to have explicit x86 vs x64 interop classes. They all reference the exact same assembly name. Let's remove the duplicate file but keep the native interop wrapper. See code snippet example below.