Page 1 of 1

Any way to read Paint.NET images (.pdn) files

Posted: Tue Jul 14, 2009 4:04 am
by budz45
.. Like the way we can view Photoshop .psd files ever so conveninetly in Xnview, I am wondering if there is a plugin that supports the same for Paint.NET .pdn images (with all layers, transparency) like photoshop's??

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Fri Jul 17, 2009 12:26 pm
by helmut
Currently there is no Plug-In for Paint.NET files. But maybe a good and feasible idea.

Note:
Topic 'Does XnView support graphic format .xyz?' provides various information regarding format support.

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 1:32 pm
by budz45
Paint.Net (.pdn) is not supported:
http://www.xnview.com/en/formats.html

So support can be added for the raw editor format; it's similar to photoshop .psd which is already supported in Xnview

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 2:07 pm
by xnview
budz45 wrote:So support can be added for the raw editor format; it's similar to photoshop .psd which is already supported in Xnview
Yes, but i can't find spec of pdn format...

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 2:38 pm
by budz45
xnview wrote:
budz45 wrote:So support can be added for the raw editor format; it's similar to photoshop .psd which is already supported in Xnview
Yes, but i can't find spec of pdn format...
Do you mean code specifications or the source? I think this could help: DNAN: PDN Specifications - Developer Community

..It mentions that .pdn is used by Paint.Net and that .pdn is simply a zip format for .NET applications (like paint.net)... Or if you want Im a member on paint.net forums I could ask devs there..

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 2:43 pm
by xnview
budz45 wrote: Do you mean code specifications or the source? I think this could help: DNAN: PDN Specifications - Developer Community

..It mentions that .pdn is used by Paint.Net and that .pdn is simply a zip format for .NET applications (like paint.net)... Or if you want Im a member on paint.net forums I could ask devs there..
There is no spec, and it's not a zip file :-)

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 2:45 pm
by budz45
OK, best I can do is login to Paint.net forums and ask dev's on forum (Rick Brewster)... I will get back to this subject later

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Wed Oct 28, 2009 5:30 pm
by XnTriq
Rick Brewster ([url=http://web.archive.org/web/20051230140736/http://blogs.msdn.com/rickbrew/archive/2005/01/18/355571.aspx]Paint.NET's file format, “.pdn”[/url]) wrote:We compress the data as it is being serialized. Essentially we create a FileStream object, and then wrap a compressing stream around that (search for #ziplib for what we used). All data written to the compressing stream eventually makes its way to the regular FileStream (albeit compressed) and we save a lot of disk space. And we use “gzip” compression to do this. Of course some images don't compress well in which case we're just the same as a .BMP file. But that's fine. We wanted to save disk space when we could. Heck, in some cases our file size for a single layer image is lower than .PNG :) That's just circumstantial though. We never put any engineering effort into squishing our file size beyind what #ziplib would do for us.

So to summarize, a .PDN file is just a .GZ file that contains an instance of our Document class that has been serialized using regular ol' .NET Serialization. If you rename a .PDN file to .GZ you can work with it using gzip or WinRAR (although Paint.NET won't recognize it).

The problem now is that no other program can read and write our file format. It would be nice to have a PaintDotNet.Data.dll that housed all our data classes so at least other managed code could easily read/write our file type, but this is not the current situation.

Anyway, so what's the moral here? .NET Serialization is great. But it makes it harder for other programs to read your format because you won't have a definition of the binary layout of your file. If you want to allow that, put your data classes in a separate assembly.

This posting is made “AS IS”, with no warranty, and confers no rights.

Re: Anyway to read Paint.NET images (.pdn) files

Posted: Thu Oct 29, 2009 7:00 pm
by budz45
Thanks XnTriq , looks like things are not possible then... it's good we tried :D

Re: Any way to read Paint.NET images (.pdn) files

Posted: Sun Apr 09, 2017 3:05 am
by Bob Geldork
It may be time to revisit PDN support now that other software has it (some of which are open source). As far as I understand, there's now a library available to read PDN files.

https://forums.getpaint.net/index.php?/ ... -paintnet/

Re: Any way to read Paint.NET images (.pdn) files

Posted: Tue Apr 11, 2017 3:38 pm
by xnview
Bob Geldork wrote:It may be time to revisit PDN support now that other software has it (some of which are open source). As far as I understand, there's now a library available to read PDN files.
which open source software has PDN support?

Re: Any way to read Paint.NET images (.pdn) files

Posted: Tue Apr 11, 2017 11:34 pm
by Bob Geldork
LazPaint, for example. It's written in Lazarus, a Delphi clone, i.e., Object Pascal, but it's open source nevertheless with the code published on SourceForge.