Support saving in .avif (AV1 Image File Format)
AVIF (AV1 Image File Format) is a new image format based on the AV1 video codec. It supports both lossless and lossy compression and saves up to 50% space at the same quality compared to JPG.
A checkbox for lossless compression (enabled by default) and a slider for the quality/compression ratio when lossy compression is used would be nice.
Here is the AVIF specification and some .avif samples from Netflix and Microsoft. AVIF files can currently be viewed with VLC and are going to be supported soon in Firefox and Windows 10.
We need to wait for a .NET implementation of an encoded & decoder for this file format. I'm not so good at mathematics that I would be able to pull that off without spending the next months 24x7 on something like that. From my point of view is not a direct need for this, I don't see a huge benefit when this would be implemented, thus the priority is low.
As soon as there is something here, we can have a look if that can be integrated: https://www.nuget.org/packages?q=avif
Besides, avif soons like a video, not primary aimed at single images.
libavif tagged a new release, 0.1.3. See Colorist for an example implementation.
That is cool, but libavif is a c-library (unmanaged) , and Greenshot is made with C# (managed), mixing this is certainly possible but brings a lot of issues. I currently don't have the time to port C to C# or write a wrapper. It doesn't matter how many releases there are 😉
I could modify Greenshot to have a way to bring new file formats to it, this is something which is on my list anyway. This way someone can build an add-on to extend Greenshot with this format. One only has to implement the interface and call libavif for reading raw image data into memory to create a Greenshot bitmap and calling libavif to write the raw image data from memory.
The following seems to add avif for paint.net https://github.com/0xC0000054/pdn-avif i created a issue asking if they could create a nuget package from it so that we can use avif in normal c# code. (Its a wrapper around the dlls so its not a native implementation)
Hello everyone,
since the previously mentioned issue isn't going to happen (here), I was curious if this is still considered.
I had to make a big batch of screenshots (PNG) for documentation purposes and it went down from 340 MB to 37 MB when converting them to AVIF via command line. Tried JPEG as well, but it didn't come even close.
This is why I would really love to be able to save it as AVIF directly without any manual steps. I know that the reason for the absence was the missing C#/.NET support to export it in that format.
Has anything changed in those two and a half years? Are there approaches / libraries which are acceptable now? (I have seen some things, but they call to native binaries under the hood)
Kind regards, BMC
We need to wait for a .NET implementation of an encoded & decoder for this file format. I'm not so good at mathematics that I would be able to pull that off without spending the next months 24x7 on something like that. From my point of view is not a direct need for this, I don't see a huge benefit when this would be implemented, thus the priority is low.
As soon as there is something here, we can have a look if that can be integrated: https://www.nuget.org/packages?q=avif
Can a binding such as LibHeifSharp 3.2.0 be integrated into Greenshot?
I could modify Greenshot to have a way to bring new file formats to it, this is something which is on my list anyway. This way someone can build an add-on to extend Greenshot with this format. One only has to implement the interface and call libavif for reading raw image data into memory to create a Greenshot bitmap and calling libavif to write the raw image data from memory.
Is IFileFormatHandler the interface meant to allow file format extensions/plug-ins?