null54

AVIF FileType (07-30-2020)

Recommended Posts

This plugin allows AVIF images to be loaded and saved with transparency.

It will replace Paint.NET's built-in AVIF support.

 

Compatibility: 4.2.12+

 

Installation:

 

1. Close Paint.NET.
2. Place AvifFileType.dll, AvifNative_x86.dll and AvifNative_x64.dll in the Paint.NET FileTypes folder which is usually located in one the following locations depending on the Paint.NET version you have installed.

  Classic: C:\Program Files\Paint.NET\FileTypes    
  Microsoft Store: Documents\paint.net App Files\FileTypes

3. Open the Windows Run dialog (Start > Run or Windows Key + R)
4. Type paintdotnet:/set:FileTypes/BuiltInAV1FileTypeEnabled=false and press the Enter key
5. Restart Paint.NET.

 

Download: AvifFileType.zip

 

Source Code: https://github.com/0xC0000054/pdn-avif

 

  • Upvote 1

Share this post


Link to post
Share on other sites

Released beta version 0.6.0.

 

Changes:

  • Reduced memory usage when loading files.
  • Added support for loading image grids.
  • Upvote 2

Share this post


Link to post
Share on other sites

Released beta version 0.7.0.

 

Changes:

  • Add support for negative crop offsets
  • Improve error reporting
  • Reduce memory usage when saving files
  • Upvote 2

Share this post


Link to post
Share on other sites

Thank you very much for this FileType plugin. Looking forward to start experimenting with AVIF.

  • Is lossless supported/ is quality slider at 100% lossless?
  • Would it be feasible to implement a bit depth option when saving an image?

Share this post


Link to post
Share on other sites
4 hours ago, olavrb said:

Is lossless supported/ is quality slider at 100% lossless?

 

Lossless is supported, but the RGB to YUV conversion is lossy (see https://github.com/joedrago/colorist/issues/26 for more details).

 

4 hours ago, olavrb said:

Would it be feasible to implement a bit depth option when saving an image?

 

What do you mean by bit-depth?

If you are referring to bits-per-channel, Paint.NET only supports editing in 8 bits-per-channel.

  • Upvote 1

Share this post


Link to post
Share on other sites

Probably means like this 

 

image.png

 

The auto-detect code is a pain, but extremely useful, I can probably find a way to make it available for plugin use

 

  • Like 2

Share this post


Link to post
Share on other sites
22 minutes ago, Rick Brewster said:

Probably means like this 

 

My code already uses auto-detection for the bit depth, it ignores the alpha channel if it is opaque.

Gray scale (monochrome) support is possible, but when I tested it using cavif the monochrome encoding option it only saved 3 bytes vs a gray scale image saved as 24-bit.

  • Upvote 1

Share this post


Link to post
Share on other sites

Released beta version 0.8.0.

 

Changes:

  • Added support for lossless encoding of color and gray-scale images
  • Reduced the file size when saving gray-scale images
  • Reduced the file size when saving images with transparency
  • Added XMP metadata support for Paint.NET 4.2.11
  • Reduced memory usage when loading images

Note that this release requires Paint.NET 4.2.11 or later.

  • Like 1
  • Upvote 2

Share this post


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

libavif released v0.7.3 with native lossless support, might be helpfull?

 

I already added lossless support in version 0.8.0.

  • Upvote 1

Share this post


Link to post
Share on other sites

Release version 1.0.0.

 

Changes:

  • Upgraded to libaom v2.0.0
  • Allow lossless images to use an ICC color profile
  • Improved performance when loading and saving images
  • Fixed the AV1 chroma sub-sampling fields for YUV 4:2:2
  • Reject images with unsupported essential properties
  • Attempt to preserve the color conversion data for loaded AVIF images

I did not create a new thread in the plugins forum due to the additional steps that are required to install this plugin.

  • Like 1

Share this post


Link to post
Share on other sites

Release version 1.0.1.

 

Changes:

  • Changed the target framework to .NET 4.7 to allow for bundling with Paint.NET
  • Like 2
  • Upvote 1

Share this post


Link to post
Share on other sites

Thank you very very much! This is extremely awesome to have a plugin without any Store codec dependency. Although the resulting file size is still larger than the super compact size produced by IrfanView's WebP plugin despite Best compression, 85% quality and Slow compression mode.

Edited by xpclient

Share this post


Link to post
Share on other sites
19 hours ago, xpclient said:

Although the resulting file size is still larger than the super compact size produced by IrfanView's WebP plugin despite Best compression, 85% quality and Slow compression mode.

 

WebP and AV1 are different formats, so it is not surprising that there would be a size difference with the same settings.

Share this post


Link to post
Share on other sites
On 6/30/2020 at 4:37 PM, null54 said:

 

WebP and AV1 are different formats, so it is not surprising that there would be a size difference with the same settings.

Oh I know they are entirely different compressions. :) I just somehow got the (wrong) impression that since WebP's around for a long time and with a BSD license, AVIF being based on AV1 was somehow supposed to outperform WebP,  not just JPEG or that was the whole point of it.

Anyway, WebP has a major Achilles heel - metadata. Google provides no tools for managing or displaying WebP metadata although it is possible and documented. Hopefully due to Microsoft supporting AVIF in Windows, it won't be a problem with AVIF. :) 

Share this post


Link to post
Share on other sites

Release version 1.0.2

 

Changes:

  • Changed the FileType name to AV1 (AVIF)
  • Fixed an issue with preserving the AVIF color conversion data
  • Disable row multi-threading when encoding with a single thread
  • Reduced the native DLL size
  • Fixed a potential memory leak
  • Like 2

Share this post


Link to post
Share on other sites
On 7/3/2020 at 1:45 AM, xpclient said:

Anyway, WebP has a major Achilles heel - metadata.

 

Another is that it's limited to 16,383 x 16,383 pixels 🤦‍♂️

  • Like 1

Share this post


Link to post
Share on other sites
On 7/3/2020 at 2:45 AM, xpclient said:

Google provides no tools for managing or displaying WebP metadata although it is possible and documented.

 

Not true, the webpmux sample utility can be used to add and remove WebP metadata.

But I do not think that either the Microsoft or Google WIC decoder supports reading the EXIF/XMP metadata.

 

1 hour ago, Rick Brewster said:

Another is that it's limited to 16,383 x 16,383 pixels 🤦‍♂️

 

That is a limitation of the VP8 compression format that WebP uses, I have no idea why a video compression format released in 2008 would only use 14 bits for the image width and height.

  • Like 2

Share this post


Link to post
Share on other sites

Thank you so much for this plugin, it works great! I hope they will optimize the underlying libraries (and hopefully make it run on GPUs) in future so it works as fast as other image formats.

One little thing I've noticed - Windows' Paint doesn't seem to care about the exported color profile in those avif's. Maybe you could add an option to attach or ignore color profiles. Also, GIMP shows some error/warning when I open files, exported by this plugin. Browsers don't complain though.

Share this post


Link to post
Share on other sites
42 minutes ago, art926 said:

Windows' Paint doesn't seem to care about the exported color profile in those avif's.

 

The color profile is being exported, so that may just be another bug in Microsoft's AVIF codec.

 

1 hour ago, art926 said:

Also, GIMP shows some error/warning when I open files, exported by this plugin.

 

It looks like libavif is failing to load the property associations for the alpha channel image.

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.