shimat / opencvsharp

OpenCV wrapper for .NET
Apache License 2.0
5.44k stars 1.15k forks source link

Avif encoder not available #1671

Open robert-mihalache opened 6 months ago

robert-mihalache commented 6 months ago

Summary of your issue

When calling EmEncode with .avif extension an exception is being generated, informing the encoder is not available. OpenCV 4.9 documentation mentions support for this format.

Environment

Write your environment.

OpenCV4Sharp 4.9 Windows 11 x64 Visual Studio 2022 17.9.7

Write here

Example code:

private readonly int[] _parametersAvif = [512, 60];
Cv2.ImEncode(".avif", _image, out byte[] buffer, _parametersAvif);

Output:

OpenCvSharp.OpenCVException: 'could not find encoder for the specified extension'

What did you intend to be?

Return the buffer containing the encoded image

robert-mihalache commented 4 months ago

Is anyone looking into this?