Jump to content
How to Install Plugins ×

WebP Filetype (2023-11-26)


null54

Recommended Posts

4 hours ago, skr68 said:

Chrome, IrfanView Firefox and Windows Photo Viewer (with webp plugins installed) can handle the file with the wrong extension perfectly, they seem to look at the content rather than the extension. Could the same be achieved for paint.net as well? That would make this plugin just perfect!

 

I do not know, that would be a question for @Rick Brewster.

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

Yeah, I thought that.

 

But I also thought that the plugin might work as a hook, i.e. whenever a file is opened in paint.net, it checks if there is a plugin hooked in, which in turn checks if it should handle the opening. In case of the webp plugin I figured that it only looks for the file extension (PNG) and decides hold still and process back to paint.net, which fails opening the file because it is a secret WEBP file.

 

If that is true, could the plugin not check the file content to see if it is a WEBP file in disguise and open it regardless of the extension, or otherwise pass control back to paint.net? Or will it not be called for PNG files at all?

 

But I guess you would know that better than me ;)

Edited by skr68
Link to comment
Share on other sites

1 hour ago, skr68 said:

If that is true, could the plugin not check the file content to see if it is a WEBP file in disguise and open it regardless of the extension, or otherwise pass control back to paint.net? Or will it not be called for PNG files at all?

 

The plugin will only be called for files with a .webp extension.

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...
On 1/25/2019 at 11:55 AM, null54 said:

Updated to use WebP version 1.0.2, file version updated to 1.0.9.1.

 

Worked like a charm!

 

Thank You

Link to comment
Share on other sites

Corrected the handling of color profile metadata.
Simplified the save configuration dialog and converted it to IndirectUI.

File version updated to 1.1.0.0.

  • 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

  • Fixed a crash relating to the save cancellation in Paint.NET 4.1.7.
  • Convert the WebP EXIF metadata into a format that Paint.NET understands.
  • Reduced memory usage when saving.
  • Fixed a P/Invoke marshaling bug when saving the WebP metadata.

File version updated to 1.2.0.0.

  • Like 2
  • 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

<3 @null54

 

Thanks for the new addition and for your effort. :cake: :coffee:
 

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

Fixed the cancellation support and improved metadata handling on Paint.NET 4.2.1.

Reduced memory usage when saving.
Added a 3.5.11 and 4.0.X compatible FileType as a separate download.

  • Like 2
  • 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

Fixed an error when saving EXIF metadata with zero items.
Fixed a potential memory leak when loading WebP images.

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 weeks later...

hey man. I cant open file.

this is error i get

image link

 

 

Application version: paint.net 4.2.5

 

WebPFileType.WebPException: The file is not a valid WebP Image.

   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 512

   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 512

   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

file works for sure, i can open in image viewer.. ok nvm managed as save as in image viewer

Edited by IceLancer
Link to comment
Share on other sites

  • 1 month later...

Where is the Disable Metadata? i was using Paint.NET for creating Stickers for whatsapp, now stickers don't work anymore because metadata is saved on the file without asking.

 

Please allow the user to not preserve Metadata.

Link to comment
Share on other sites

1 hour ago, Ferdari said:

Where is the Disable Metadata? i was using Paint.NET for creating Stickers for whatsapp, now stickers don't work anymore because metadata is saved on the file without asking.

 

Please allow the user to not preserve Metadata.

 

That option was removed to maintain consistency with the built-in FileTypes when the plugin was bundled with Paint.NET.

 

Quoting @Rick Brewster‘s reply on GitHub:

Quote

Yeah my advice has generally been to use an external utility to strip the metadata if that's what someone wants.

Basically, either all of the built-in/bundled FileTypes should have a "keep metadata" option, or none of them should.

 

It sounds like WhatsApp may have a metadata processing bug.

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 weeks later...
On 12/6/2019 at 10:48 PM, null54 said:

 

That option was removed to maintain consistency with the built-in FileTypes when the plugin was bundled with Paint.NET.

 

Quoting @Rick Brewster‘s reply on GitHub:

 

It sounds like WhatsApp may have a metadata processing bug.

i read the conversation on Github, that was sad, they decided to just remove it without thinking on the user or the functionality, remember that the people who uses the webp plugin are advanced users(webmasters, developers, designers) who need the full features of the plugin, we are not kids saving WEBP files that confuses easily, if i want to only encode a PNGs i just use a batch encoder (even a batch encoder has full webp features)

image.png.dacaba35108fabad12ddf7b01a15d56c.png

But if i want to edit a picture and save WEBP with advanced options Paint.net is not an option anymore, you doubled the workload 😭.

Link to comment
Share on other sites

5 hours ago, Ferdari said:

i read the conversation on Github, that was sad, they decided to just remove it without thinking on the user or the functionality, remember that the people who uses the webp plugin are advanced users(webmasters, developers, designers) who need the full features of the plugin, we are not kids saving WEBP files that confuses easily

 

Bundling the plugin with paint.net requires catering to users of all skill levels.

 

As Rick noted when he opened the issue on GitHub, the built-in paint.net FileTypes always preserve metadata. 

It could be confusing for some users to have this FileType behave differently when it appears to be built-in.

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

On 12/18/2019 at 10:26 PM, null54 said:

 

Bundling the plugin with paint.net requires catering to users of all skill levels.

 

As Rick noted when he opened the issue on GitHub, the built-in paint.net FileTypes always preserve metadata. 

It could be confusing for some users to have this FileType behave differently when it appears to be built-in.

So, there will be a individual version with all features?

that we can replace with the bundled(tiny, foolproof, minimal, basic) version.

Link to comment
Share on other sites

2 hours ago, Ferdari said:

So, there will be a individual version with all features?

that we can replace with the bundled(tiny, foolproof, minimal, basic) version.

 

I do not think so.

 

Providing basic and advanced versions of the plugin would cause the available features to change when paint.net is updated.

It would also complicate my build and release process.

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

On 12/19/2019 at 8:54 AM, Ferdari said:

the people who uses the webp plugin are advanced users(webmasters, developers, designers) who need the full features of the plugin, we are not kids saving WEBP files that confuses easily,

 

Fork the Github repo and build your own version of the plugin? If your personal build is versioned later than the bundled one it will take precedence and be loaded in it's place.

 

Of course this is a personal solution. For the reasons given, releasing your own build will not be supported/actively discouraged.

 

Licence: https://github.com/0xC0000054/pdn-webp/blob/master/License.txt

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...