Avif image - read/convert to dibitmap

New to FreeBASIC? Post your questions here.
Iczer
Posts: 99
Joined: Jul 04, 2017 18:09

Re: Avif image - read/convert to dibitmap

Post by Iczer »

Solved! Just set desired bit depth and format before converting from YUV to RGB...

Code: Select all

While avifDecoderNextImage(decoder) = AVIF_RESULT_OK
	avifRGBImageSetDefaults(@_rgb, decoder->image)
	_rgb.depth = 8
	_rgb.format = AVIF_RGB_FORMAT_BGR
	avifRGBImageAllocatePixels(@_rgb)
	avifImageYUVToRGB(decoder->image, @_rgb)
Wend
Iczer
Posts: 99
Joined: Jul 04, 2017 18:09

Re: Avif image - read/convert to dibitmap

Post by Iczer »

just wanted to check actual version of compiled libavif.dll and discovered that it has none - on right-click->properties in explorer there a no "version" tab in displayed window. Going by library sources, version should be "0.10.1.0". Did I miss something on configure(cmake) or compile time for version tab to be present on properties?
romilgildo
Posts: 1
Joined: Nov 10, 2022 11:32

Re: Avif image - read/convert to dibitmap

Post by romilgildo »

Hello, I have a project in VB.Net and I want to use libavif. I found this .Net library that use libavif (https://libraries.io/nuget/libavif-sharp) but it is necessary the "avif.dll" file. I've tried to get it by compiling the source code from libavif (https://github.com/AOMediaCodec/libavif), but I can't.

Do you have any avif.dll or can you tell me the steps to follow to obtain it?

Thank you very much.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: Avif image - read/convert to dibitmap

Post by UEZ »

This worked for me: viewtopic.php?p=292231#p292231
Post Reply