Jump to content
How to Install Plugins ×

WebP Filetype (2023-11-26)


null54

Recommended Posts

@Ferdari, you're asking others to do a lot of work on your behalf, and making assumptions about a lot of other people's decisions and motivations to fit your personal narrative and agenda. Chill out!

 

@Ego Eram Reputo's suggestion is the best one. If you truly are an "advanced user" as you claim to be, you'll figure out a solution. Maybe you fork the plugin, maybe you just find or write a little command-line utility to automate stripping out the metadata. Maybe you'll even come full circle and share your solution with us. Stop expecting everyone else to cater to your demands, and stop expecting everything to be super easy. That's not how you make progress, here or in life.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 3 months later...

Hey. 

 

Im trying to open an animated webp but I get this error, can you help?

 

Spoiler

Application version: paint.net 4.2.10

WebPFileType.WebPException: The file is not a valid WebP Image.
   at WebPFileType.WebPNative.WebPLoad(Byte[] webpBytes, BitmapData output)
   at WebPFileType.WebPFile.Load(Byte[] webpBytes)
   at WebPFileType.WebPFileType.GetOrientedDocument(Byte[] bytes, ExifValueCollection& exifMetadata)
   at WebPFileType.WebPFileType.OnLoad(Stream input)
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 522
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 522
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

 

Link to comment
Share on other sites

18 hours ago, cosmonautti said:

Im trying to open an animated webp but I get this error, can you help?

 

This plugin does not support creating or editing animated WebP images, it is designed for single frame images.

I will add a better error message in the next version.

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2021-02-05)
  • null54 changed the title to WebP Filetype (2021-09-05)

Release version 1.3.7.

Changes:

  • Updated to libwebp version 1.2.1.
  • Enabled hardware acceleration (ARM NEON) for the ARM64 build.

 

As of version 1.3.7, Paint.NET 3.5.11 and 4.0.X are no longer supported.

  • Like 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Opening a webp A without an embedded exif chunk shows a dpi value of 120. I expected 72 dpi (the exif default value).

Setting the dpi value to 150, saving as B and opening B shows 150. So this works.

A and B show a dpi value of 72 in properties/details dialog of Windows Explorer. The difference is that B shows the ResolutionUnit. Looks like an explorer issue.

midoras signature.gif

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-01-24)

Release version 1.3.8.

Changes:

  • Updated to libwebp version 1.2.2.
  • Fixed a bug with the EXIF ColorSpace property handling.

I also added a note to the first post about animated images not being supported, and a link to the Animated WebP plugin.

  • Like 1
  • Thanks 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

More than 10 years of providing updates for this plugin. From the first WebP beta libraries to the now most stable version.

Thanks for that.
Let's see which image format will win the competition in the future. WebP, Avif, Jpeg XL, or maybe WebP2?

midoras signature.gif

Link to comment
Share on other sites

16 minutes ago, midora said:

Let's see which image format will win the competition in the future. WebP, Avif, Jpeg XL, or maybe WebP2?

 

I suspect that all of those image formats will be competing against one another without a clear winner.

XKCD has a comic about competing standards:  https://xkcd.com/927

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Release version 1.3.9.

Changes:

  • Fixed compliance issue in the EXIF writer.

A few required tags were being removed immediately after adding them. 🙄

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-02-06)

Release version 1.3.10.

Changes:

  • Fixed an issue with the EXIF rotation code.
  • Fixed a few issues when writing the EXIF metadata.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-02-07)

Release version 1.3.11.

Changes:

  • Fixed an issue with the 180 degree EXIF rotation code.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 2 months later...

  

Hello,

I try to convert very large picture from PNG with alpha channel to WEBP .

 

This picture is really large, just near max resolution 16383x16383 but does not exceed maximum yet.

 

Paint net works with smaller pictures. This one stops at 52% and after a while throws exception. I have 20 GB free space on disc C.

 

The message:

 

Quote

Exception:

WebPFileType.WebPException: Partition #0 is larger than 512 Kb.
   at WebPFileType.WebPNative.WebPSave(Surface input, Stream output, EncodeParams parameters, MetadataParams metadata, WebPReportProgress callback)
   at WebPFileType.WebPFile.Save(Document input, Stream output, Int32 quality, WebPPreset preset, Surface scratchSurface, ProgressEventHandler progressCallback)
   at WebPFileType.WebPFileType.OnSaveT(Document input, Stream output, PropertyBasedSaveConfigToken token, Surface scratchSurface, ProgressEventHandler progressCallback)
   at PaintDotNet.FileType`2.OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) in D:\src\pdn\src_4_3_x\Data\FileType`2.cs:line 39
   at PaintDotNet.Data.FileTypeProxy.OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback) in D:\src\pdn\src_4_3_x\PaintDotNet\Data\FileTypeProxy.cs:line 68
   at PaintDotNet.FileType.Save(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback, Boolean rememberToken) in D:\src\pdn\src_4_3_x\Data\FileType.cs:line 261
   at PaintDotNet.Controls.DocumentWorkspace.<>c__DisplayClass248_1.<DoSaveImpl>b__7() in D:\src\pdn\src_4_3_x\PaintDotNet\Controls\DocumentWorkspace.cs:line 2791
   at PaintDotNet.Functional.Func.Try(Action f) in D:\src\pdn\src_4_3_x\Base\Functional\Func.cs:line 181

Diagnostics:

Application                                                  paint.net 4.3.10 (Stable 4.310.8103.32785)

 

I am sorry, actually Gimp throws same WebP error: 'partition is bigger than 512K'

 

Edit.

Okay, found the culprit:

-partition_limit int
Degrade quality by limiting the number of bits used by some macroblocks. Range is 0 (no degradation, the default) to 100 (full degradation). Useful values are usually around 30-70 for moderately large images. In the VP8 format, the so-called control partition has a limit of 512k and is used to store the following information: whether the macroblock is skipped, which segment it belongs to, whether it is coded as intra 4x4 or intra 16x16 mode, and finally the prediction modes to use for each of the sub-blocks. For a very large image, 512k only leaves room to few bits per 16x16 macroblock. The absolute minimum is 4 bits per macroblock. Skip, segment, and mode information can use up almost all these 4 bits (although the case is unlikely), which is problematic for very large images. The partition_limit factor controls how frequently the most bit-costly mode (intra 4x4) will be used. This is useful in case the 512k limit is reached and the following message is displayed: Error code: 6 (PARTITION0_OVERFLOW: Partition #0 is too big to fit 512k). If using -partition_limit is not enough to meet the 512k constraint, one should use less segments in order to save more header bits per macroblock. See the -segments option.
 
 
Is it possible to add more options to the Plugin? ;)
Edited by sirdaniel
Link to comment
Share on other sites

1 hour ago, sirdaniel said:

Is it possible to add more options to the Plugin? ;)

 

Those advanced encoding options are unlikely to be added, this plugin was never intended to expose all of the options that are available in Google's cwebp utility.

I recommend that you use cwebp if you need control over metadata or the other advanced WebP encoding options it provides.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-04-15)

Release version 1.3.12

Changes:

  • Detect if the image is a misnamed JPEG/PNG file and load it using GDI+.
  • Like 3

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-06-07)

Release version 1.3.13.

Changes:

  • Added a check box for lossless compression.
    • This replaces the previous behavior of silently using lossless compression when the quality is 100.
  • Improved metadata handling when loading files with the wrong extension.
  • Detect BMP files with the wrong extension.
  • Like 1
  • Thanks 1
  • Upvote 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2022-08-14)
  • null54 changed the title to WebP Filetype (2023-01-16)

Release version 1.3.15.

 

This release is for Paint.NET 5.0+.

 

Changes:

 

Updated to libwebp version 1.3.0.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to WebP Filetype (2023-01-20)

Release version 1.3.16.

 

This release is for Paint.NET 5.0+.

 

Changes:

 

Fixed the detection of misnamed files.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 1 month later...

I downloaded P.N version 4.3.12 with bundled webp format support. I also download and install webp files into FileType folder. But webp image can't be open. I got message like this:

D:\Programy\Paint.NET\paintdotnet.dll, wersja 4.312.8267.29064

Typ: PaintDotNet.Data.WebPFileType
System.InvalidOperationException: No FileTypes were provided by D:\Programy\Paint.NET\Bundled\WebPFileType\WebPFileType.dll
   at PaintDotNet.Data.BundledFileTypeLoader.LoadFileTypePlugin(IPluginErrorService pluginErrorService) in D:\src\pdn\src_4_3_x\PaintDotNet\Data\BundledFileTypeLoader.cs:line 130
   at PaintDotNet.Data.BundledFileTypeLoader.EnsureInitialized() in D:\src\pdn\src_4_3_x\PaintDotNet\Data\BundledFileTypeLoader.cs:line 76
   at PaintDotNet.Data.WebPFileType..ctor(IFileTypeHost fileTypeHost) in D:\src\pdn\src_4_3_x\PaintDotNet\Data\WebPFileType.cs:line 26
   at PaintDotNet.Data.PdnFileTypes.<>c__DisplayClass1_0.<GetFileTypeInstances>b__6() in D:\src\pdn\src_4_3_x\PaintDotNet\Data\PdnFileTypes.cs:line 42
   at PaintDotNet.Data.FileTypeHelpers.TryCreateWithErrorReporting[T](IFileTypeHost host, Func`1 factoryFn) in D:\src\pdn\src_4_3_x\PaintDotNet\Data\FileTypeHelpers.cs:line 82

Any idea how it can be fixed?

Link to comment
Share on other sites

10 minutes ago, x-54 said:

I downloaded P.N version 4.3.12 with bundled webp format support. I also download and install webp files into FileType folder.

 

The plugin requires paint.net v5.

 

We don't offer any support for old versions of paint.net here on the forum.

  • Like 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
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.

×
×
  • Create New...