Sign in to follow this  
olavrb

[Request] Save as AVIF

Recommended Posts

Decode support since v4.2.2 using Microsofts decoder from Microsoft Store is great, thanks for that. 😊 

 

It would be even greater if Paint.NET could embrace this new open codec even further by implementing the ability to create lossy and lossless AVIF files. Not asking for an ETA or anything, but better get the discussion going sooner rather than later.

 

Since it's about creating a single keyframe, visual quality should be more important than performance/ speed. Don't know enough about AV1 encoders to say which is most fit, but someone else might have the answer to that.

 

Leaving some inspiration on the topic of AVIF:

Edited by olavrb

Share this post


Link to post
Share on other sites
10 minutes ago, olavrb said:

Decode support since v4.2.2 using Microsoft's decoder from Microsoft Store is great ...

 

You hit the nail on the head. Support for AVIF in Paint.NET is dependent on the image codec from Microsoft. The codec doesn't support encoding, therefore Paint.NET doesn't either.  Feel free to send your request to Microsoft.

 

 

There are a few encoders in existence, so maybe a plugin developer will leverage one of them to implement Paint.NET support.

  • Like 1

Share this post


Link to post
Share on other sites

I won't be able to dedicate any time for this. However, if someone is willing to make a plugin and release it as open source (not GPL), then I'm open to bundling it.

 

I added an AppSetting that permits disabling the built-in AV1 (*.avif) plugin in order to facilitate the future development of said plugin. Otherwise, the built-in handler would always take precedence.

 

So if anyone's interested, let me know and I'll get you the details.

  • Like 1

Share this post


Link to post
Share on other sites
On 3/19/2020 at 12:11 PM, toe_head2001 said:

There are a few encoders in existence, so maybe a plugin developer will leverage one of them to implement Paint.NET support.

 

A plugin would also need decoding support, as it would replace the Microsoft decoder that Paint.NET currently uses.

This also requires reading/writing the AV1 container file format, and I have not yet found a stable library that can do that.

 

Libheif currently only has experimental support for AV1.

Libavif has good support for reading/writing the avif file format, but the current version will crash on out of memory conditions.

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, null54 said:

A plugin would also need decoding support

 

Actually, maybe not. Since the built-in FileType only supports decoding, the plugin FileType could just implement encoding. Just set FileType::LoadExtensions to an empty list.

No need to even employ the AppSetting in that case.

Share this post


Link to post
Share on other sites
On 3/21/2020 at 12:27 AM, Rick Brewster said:

Actually, maybe not. Since the built-in FileType only supports decoding, the plugin FileType could just implement encoding. Just set FileType::LoadExtensions to an empty list.

 

Loading is required as the AVIF format can use lossy compression, when IsReflexive returns false the SaveConfigDialog always calls the Load method to get a preview image.

 

After getting my AVIF save code working I discovered that Microsoft's AVIF decoder does not support reading images with transparency, so it looks like I will have to write my own AVIF parsing code if I want to keep the support for saving images with transparency. 😞

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this