diff --git a/Util/WebPHelper.cs b/Util/WebPHelper.cs index 4e0dcf8..f21920f 100644 --- a/Util/WebPHelper.cs +++ b/Util/WebPHelper.cs @@ -28,6 +28,8 @@ internal static class WebPHelper { rgba = new byte[width * height * 4]; var decoderConfig = default(WebPDecoderConfig); + Native.WebPInitDecoderConfig(ref decoderConfig); + using var free = new OnDispose(() => Native.WebPFreeDecBuffer(ref decoderConfig.output)); decoderConfig.input = features; decoderConfig.output.colorSpace = WebpCspMode.ModeRgba; decoderConfig.output.isExternalMemory = 1;