Jump to content


Photo

Layer Saver (October 21, 2008)


47 replies to this topic

#1 I Like Pi

I Like Pi
  • Members
  • 186 posts
  • Reputation:0

Posted 03 May 2008 - 07:12 PM

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:
Attached File  Layer Saver.zip   10.06KB   6910 downloads








Source Code:
License: GNU General Public License (GPL) v3
Attached File  Source Code.zip   26.64KB   753 downloads

  • 0

#2 salu

salu
  • Members
  • 1,058 posts
  • Locationan Unknown State of Animals
  • Reputation:0

Posted 03 May 2008 - 09:16 PM

ill test it :D
  • 0

#3 Fisherman's Friend

Fisherman's Friend
  • Members
  • 490 posts
  • LocationCoruscant
  • Reputation:1

Posted 04 May 2008 - 01:09 AM

Any chance to include it as a filetype plugin (like the OptiPNG EXE)?
  • 0

#4 I Like Pi

I Like Pi
  • Members
  • 186 posts
  • Reputation:0

Posted 04 May 2008 - 05:06 PM

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

#5 kernalphage

kernalphage
  • Members
  • 17 posts
  • Reputation:0

Posted 04 May 2008 - 06:51 PM

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

#6 thehamster

thehamster
  • Members
  • 258 posts
  • LocationSarasota, Florida
  • Reputation:0

Posted 12 May 2008 - 12:27 AM

This is awesome.
Tested with an animation.
Posted Image
  • 0

#7 Halomainaic1234

Halomainaic1234
  • Newbies
  • 1 posts
  • Reputation:0

Posted 27 May 2008 - 03:05 AM

Where do you put the file, exactly?
  • 0
Posted Image

#8 Simon Brown

Simon Brown
  • Members
  • 10,251 posts
  • Reputation:26

Posted 27 May 2008 - 09:37 AM

Where do you put the file, exactly?


Unzip it to anywhere and open it.
  • 0
Posted Image

#9 Mike Ryan

Mike Ryan
  • Competition Hosts
  • 4,266 posts
  • Reputation:10

Posted 27 May 2008 - 09:52 PM

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

Posted Image


#10 I Like Pi

I Like Pi
  • Members
  • 186 posts
  • Reputation:0

Posted 28 May 2008 - 12:39 AM

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

#11 Simon Brown

Simon Brown
  • Members
  • 10,251 posts
  • Reputation:26

Posted 28 May 2008 - 12:45 AM

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
Posted Image

#12 Mike Ryan

Mike Ryan
  • Competition Hosts
  • 4,266 posts
  • Reputation:10

Posted 28 May 2008 - 04:25 PM

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

Posted Image


#13 Simon Brown

Simon Brown
  • Members
  • 10,251 posts
  • Reputation:26

Posted 28 May 2008 - 04:35 PM

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
Posted Image

#14 Mike Ryan

Mike Ryan
  • Competition Hosts
  • 4,266 posts
  • Reputation:10

Posted 28 May 2008 - 04:41 PM

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

Posted Image


#15 I Like Pi

I Like Pi
  • Members
  • 186 posts
  • Reputation:0

Posted 28 May 2008 - 07:21 PM

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.

Attached Files


  • 0

#16 Ash

Ash

    Former Moderator

  • Members
  • 6,381 posts
  • Locationhttp://tinyurl.com/6kqz9v
  • Reputation:7

Posted 29 May 2008 - 01:34 AM

Myabe put everything in the 1st post?
Thanks.
  • 0

Posted Image
All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]


#17 I Like Pi

I Like Pi
  • Members
  • 186 posts
  • Reputation:0

Posted 29 May 2008 - 08:03 PM

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

#18 Ash

Ash

    Former Moderator

  • Members
  • 6,381 posts
  • Locationhttp://tinyurl.com/6kqz9v
  • Reputation:7

Posted 30 May 2008 - 12:14 AM

I see your point. :Nod:
  • 0

Posted Image
All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]


#19 ThatFALGuy

ThatFALGuy
  • Newbies
  • 3 posts
  • Reputation:0

Posted 06 June 2008 - 06:34 AM

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:
Posted Image
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

#20 Mike Ryan

Mike Ryan
  • Competition Hosts
  • 4,266 posts
  • Reputation:10

Posted 06 June 2008 - 12:10 PM

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

Posted Image