Sign in to follow this  
Followers 0
I Like Pi

Layer Saver (October 21, 2008)

55 posts in this topic

Moderators Note: This application is incompatible with paint.net 4.0.6
 

 

This standalone executable saves each layer in a PDN file as a separate file.
IMPORTANT: Unlike most plugins, you should not put this in Paint.NET's effects or filetypes folder. Just put it anywhere and open it by double-clicking. You still need to have a Paint.NET installation, though.

Download Compiled EXE:
Layer Saver.zip








Source Code:
License: GNU General Public License (GPL) v3
Source Code.zip

Edited by Ego Eram Reputo
Added incompatibility warning.
0

Share this post


Link to post
Share on other sites

No, using a separate EXE does not grant me any extra power. Anything made through the plugin API will have the same restrictions.

0

Share this post


Link to post
Share on other sites

woah, definitely makes making animated .gifs easier!

i don't quite know how else you'd do it... uncheck each layer and re-save it?

imageshack is being gimpy right now, so i cant show the finished product, but it streamlines the process a lot when you're using unFREEz.

great plugin! :D

0

Share this post


Link to post
Share on other sites

Alright, first off is that this is a very usefull tool, to say the least. However, I do have some feature requests: The first one is that it would be awesome if the file names actually represented the Layer names. I had to rename fourty odd files the other day even though the Layer Names represented the actualy name I wanted. Second is that it would also be nice to allow us to determine the filetype on a 'Per Layer' basis, or at least a filter of some sorts. For instance, If I have a huge .PDN file, I only want the images with transparency to be saved as a .PNG, while all of the others only deserve the menace that is the .JPG. Thanks!

0

Share this post


Link to post
Share on other sites
The first one is that it would be awesome if the file names actually represented the Layer names.
I like this idea, but what should it do if it encounters two layers with the same name or a layer with an illegal file name?
Second is that it would also be nice to allow us to determine the filetype on a 'Per Layer' basis, or at least a filter of some sorts. For instance, If I have a huge .PDN file, I only want the images with transparency to be saved as a .PNG, while all of the others only deserve the menace that is the .JPG. Thanks!
I don't think such a feature would be useful, for several reasons.


  • [*:lw0b0xba]PNG supports a format without transparency. This is what happens with MS Paint and PDN's 24 bit mode.
    [*:lw0b0xba]The best file type depends more on the content of the image than whether it has an alpha channel. For example, saving plain text on a white background as a JPEG would result in noticeable compression artifacts.

0

Share this post


Link to post
Share on other sites
The first one is that it would be awesome if the file names actually represented the Layer names.
I like this idea, but what should it do if it encounters two layers with the same name or a layer with an illegal file name?

I would suggest a naming convention such as: "1 background.png" as this would allow layers to be sorted by name in order of layer index as well as deal with naming problems.

Just my 20 pence.

0

Share this post


Link to post
Share on other sites
The first one is that it would be awesome if the file names actually represented the Layer names.
I like this idea, but what should it do if it encounters two layers with the same name or a layer with an illegal file name?

Do as Sabrown has mentioned, or remove the illegal characters, or just do a naming process such as Background-1, Background-2, Background-3, etc.. that way the order is still able to be remembered.

Second is that it would also be nice to allow us to determine the filetype on a 'Per Layer' basis, or at least a filter of some sorts. For instance, If I have a huge .PDN file, I only want the images with transparency to be saved as a .PNG, while all of the others only deserve the menace that is the .JPG. Thanks!
I don't think such a feature would be useful, for several reasons.


  • [*:23gxf85t]PNG supports a format without transparency. This is what happens with MS Paint and PDN's 24 bit mode.
    [*:23gxf85t]The best file type depends more on the content of the image than whether it has an alpha channel. For example, saving plain text on a white background as a JPEG would result in noticeable compression artifacts.

PNG supports a format with transparency, actually. If it is to difficult, then just scratch it.

0

Share this post


Link to post
Share on other sites
or just do a naming process such as Background-1, Background-2, Background-3, etc.. that way the order is still able to be remembered.

Personally, I disagree. With the numbers first they can easily be sorted by layer number. Just my 20 pence.

0

Share this post


Link to post
Share on other sites

So are you saying something like 1-Background, 2-Cutout, 3-EverythingElse, etc? I dont have a problem with that as it does keep everything in proper order, and the names are still used.

0

Share this post


Link to post
Share on other sites
PNG supports a format with transparency, actually. If it is to difficult, then just scratch it.
I think you misunderstood what I said. PNG supports formats with an alpha channel and without an alpha channel, so there's no need to switch to JPG for layers without transparency to save space.

I've added in preliminary support for naming conflict resolution, custom naming formats, and file type plugins. My OptiPNG plugin is incompatible, so sometime later I'll look for the problem.

Layer Saver.zip

0

Share this post


Link to post
Share on other sites

Myabe put everything in the 1st post?

Thanks.

0

Share this post


Link to post
Share on other sites

Since that was a preview version which has a known problem and may undergo revision, I don't want to put it on the first post just yet.

0

Share this post


Link to post
Share on other sites

I see your point. :Nod:

0

Share this post


Link to post
Share on other sites

Hello. I hate this to be my first post on this forum, but the Layer Saver is not working for me. It is returning an error and is not saving properly. Instead of the many layers that I am trying to save, I get one named "0" that is empty. It is also, I dunno, distorted? Save Configuration comes up when I choose either jpg or gif format, maybe others, but when it shows it is cut off as in the pic.

What I am attempting to do is transform a 61 layer .pdn to 61 individual .gif images for use in UnFreez.

I think I have entered everything correctly, but may well not have. I expanded the LS to show my paths and such.

This is the newer DL you have. I had the same issues with the one from the first post, read the whole thread and thought it was just something buggy in the first DL.

Specs on the images:

Currently in .pdn form.

61 layers starting with layer name 1, ending at 61.

not sure on file size, but all are small, 200x150'ish.

Layer Saver was DL'd to my desktop and extracted there.

Here is a screenshot of the Layer Saver error and how/what I have configured:

2vkjm86.png

And error message:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

at PaintDotNet.GifSaveConfigWidget.InitTokenFromWidget()

at PaintDotNet.SaveConfigWidget.OnLoad(EventArgs e)

at System.Windows.Forms.UserControl.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.SetVisibleCore(Boolean value)

at System.Windows.Forms.Control.set_Visible(Boolean value)

at ILikePi.FileTypes.LayerSaver.LayerSaver.format_SelectedIndexChanged(Object sender, EventArgs e)

at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)

at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)

at System.Windows.Forms.ComboBox.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

----------------------------------------

Layer Saver

Assembly Version: 8.5.29.0

Win32 Version: 8.5.29.0

CodeBase: file:///C:/Documents%20and%20Settings/Sean/Desktop/Layer%20Saver.exe

----------------------------------------

System.Windows.Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

PaintDotNet.Core

Assembly Version: 3.22.2933.24442

Win32 Version: 3.22.2933.24442

CodeBase: file:///C:/Program%20Files/Paint.NET/PaintDotNet.Core.dll

----------------------------------------

PaintDotNet.Data

Assembly Version: 3.22.2933.24442

Win32 Version: 3.22.2933.24442

CodeBase: file:///C:/Program%20Files/Paint.NET/PaintDotNet.Data.dll

----------------------------------------

PaintDotNet.SystemLayer

Assembly Version: 3.22.2933.24441

Win32 Version: 3.22.2933.24441

CodeBase: file:///C:/Program%20Files/Paint.NET/PaintDotNet.SystemLayer.DLL

----------------------------------------

DdsFileType

Assembly Version: 1.11.2933.24444

Win32 Version: 1.11.2933.24444

CodeBase: file:///C:/Program%20Files/Paint.NET/FileTypes/DdsFileType.dll

----------------------------------------

PaintDotNet.Resources

Assembly Version: 3.22.2933.24441

Win32 Version: 3.22.2933.24441

CodeBase: file:///C:/Program%20Files/Paint.NET/PaintDotNet.Resources.DLL

----------------------------------------

wmdggq6c

Assembly Version: 0.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

6x41wwj_

Assembly Version: 0.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

PaintDotNet.Base

Assembly Version: 3.22.2933.24440

Win32 Version: 3.22.2933.24440

CodeBase: file:///C:/Program%20Files/Paint.NET/PaintDotNet.Base.DLL

----------------------------------------

System.Runtime.Serialization.Formatters.Soap

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/2.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll

----------------------------------------

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

I really hope it is only something I am doing wrong as this program additive is just the ticket for what I need.

0

Share this post


Link to post
Share on other sites

Yes, it is something you are doing wrong :) In the second text feild, notice how you placed a '.GIF' at the end of your folder name. Your folder name does not have a filetype, so just remove that extra tid bit and you should be just fine.

0

Share this post


Link to post
Share on other sites

Actually, you can't really see, or more so it looks like it is .gif, but it is not. Full name of the folder is Second Amend gif, I name each folder to know which format is contained in it like that. After seeing the photo last night when posting though, I wondered if just maybe it was something like that, a miscommunication between the LS and my machine so removed the gif at the end anyway. Now it is just plain Second Amend and still has the same issues.

Damn I wish it were that easy that I had just made such a simple mistake like that, as I am accustomed to such tings :lol:

What, if anything would I enter in the Save Configuration area as that is cut off. I am able to write in it, I just have no clue what format goes there nor can I see what is already written there. Are there any other fields below that that I am missing/not having access to due to the cutoff?

Yes, I r newb.

0

Share this post


Link to post
Share on other sites

I'm not 100% sure, but the only thing I can think of is your Paint.NET version, which is 3.22. Try updating to 3.31.

0

Share this post


Link to post
Share on other sites

That was the ticket, had not even thought of checking my version, knew it had to be something pretty basic.

Thank you for the help and for the program as well, this rocks!

0

Share this post


Link to post
Share on other sites

I've been looking for something exactly like this recently, almost tried to write one myself... :)

But when I open it, it won't run, I just get this error message:

System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files\Paint.NET\PdnLib.dll' or one of its dependencies. The system cannot find the file specified. File name: 'file:///C:\Program Files\Paint.NET\PdnLib.dll'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at ILikePi.FileTypes.LayerSaver.Program.b__0(Object sender, ResolveEventArgs args)

I have Paint.NET 3.36 installed, and I checked the program's folder, but the file doesn't exist (of course). Where can I find it, since it apparently didn't install with Paint.NET?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0