Paint.NET is going to get 8-bit and 24-bit PNG support

"It’s about time!!!" — Many users who keep pestering me for this

I just finished about 90% of the code for adding 8-bit and 24-bit support to Paint.NET’s PNG codec. Most of the work wasn’t even in the PNG codec itself, but rather in adding IndirectUI support for FileType plugins. Once that was done, the extra PNG code just tripped and fell into place. I just really didn’t want to write another WinForms widget complete with obnoxious layout and data binding.

(dang, I was trying to add a screenshot, but Windows Live Writer refuses to cooperate, oh well — I’ll save it for later I guess?)

To be honest, it’s that laborious and error-prone WinForms code that was preventing me from adding this support over the last 2 years. After you write it once you realize that you just don’t want to write and debug it ever again. With IndirectUI I only have to write the layout and data binding once, and then I can re-use it for every other file type configuration UI I make going forward.

I also plan to redo the configuration UI for the GIF, TGA, and DDS file types so that they use a few simple lines of IndirectUI instead of mountains of WinForms code. Who knows, maybe expanded BMP support will make it into the next release as well. Why not? I wish everything was as easy to implement as with IndirectUI.

Also, while implementing this I found out that the SOAP formatter for .NET serialization has essentially been deprecated. It doesn’t support serialization of types that have generic type parameters, and will not be updated … lame! So I have moved the persistence for file type settings over to the BinaryFormatter. This means that the next Paint.NET update will forget any settings you’ve had for file types. For instance, if you had JPEG set to a quality of 75 or something (default is 90), that will be reset in the next update.

8 thoughts on “Paint.NET is going to get 8-bit and 24-bit PNG support

  1. Lex Y. Li says:

    Dear, SOAP formatter is deprecated because in .NET 3.5 a JSON formatter is introduced. You can switch to that new JSON formatter but that requires .NET 3.5 Framework. Personally I hate binary formatter because I cannot read it by simply opening it in Notepad.

    And I find that you choose an easy way for settings format upgrade! You just simply give up the old format (SOAP) and break up backward compatibility which is not bad because Paint.NET is open source. However, it would be nightmare if Paint.NET is commercial πŸ™‚

    Maybe someone can write a plugin to upgrade the settings file for users later.

  2. Felipe says:

    Will it be possible to produce those PNG-8 as described in Sitepoint article? Though, it has more to do with alpha + index transparency support than Png8/24 …
    Adobe Fireworks is the only reliable graphic software to create those images (open source pngnq as described in Eriestuff has problems or bugs with some images when viewed in IE6 while being OK with others), it would be great if Paint.NET could do the same! πŸ˜‰

  3. Rick Brewster says:

    Lex Y. Li — “backwards compatibility” isn’t being broken. Old file type plugins will still work just fine. I don’t think there’s much value in writing migration code or providing a utility, as you can just redo the settings in about 5 seconds. It just wouldn’t save much time, and would be more code to carry around and support. Less code is almost always better.

    toe_head2001 — It always saves them as 32-bit.

  4. Srekel says:

    I would personally really like an option to save 8 bit bmps as well. We use those on occasions at work but we’re forced to actually open Windows Paint (ugh). (Only the artists here have access to PhotoShop)

  5. akadewboy says:

    Just like Felipe I too wish Paint.NET support 8-bit Alpha. It’s the only reason why I use Adobe Fireworks. I’d much rather use Paint.NET.

  6. Lisa says:

    How do you make a paint.net file into a JPG because it doesn’t work on my computer for previewing and printing.

Comments are closed.