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

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

Post Reply
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

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

Post 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??
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

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

Post 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.
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

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

Post 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
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post 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...
Pierre.
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

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

Post 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..
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post 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 :-)
Pierre.
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

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

Post 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
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

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

Post 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.
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

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

Post by budz45 »

Thanks XnTriq , looks like things are not possible then... it's good we tried :D
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
Bob Geldork
Posts: 3
Joined: Mon May 31, 2004 2:32 am

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

Post 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/
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post 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?
Pierre.
Bob Geldork
Posts: 3
Joined: Mon May 31, 2004 2:32 am

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

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