Jump to content


Photo

Photoshop PSD file plugin (newest version: 2.4.1)


153 replies to this topic

#41 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 29 December 2010 - 06:25 AM

Version 1.6.0 of the plugin has just been posted to Codeplex: http://psdplugin.codeplex.com/

This release fixes a longstanding bug with layer masks that caused complex PSD files to load in as garbage. Layer mask loading has also been parallelized.

In addition, hidden layers are no longer set to visible on save.

As always, please keep sending in those bug reports. The more PSD files I can collect to exercise the edge cases, the more thoroughly I can test the plugin.

--

Sorry for not responding to the most recent posts on this thread. My spam filter apparently decided to filter out notifications of thread activity.

To KeyLogic: If you're still watching this thread, please send me a .PDN version of a file that will trigger the problem. My email address is listed on the Codeplex page. Anything smaller than about 25 MB will get through. I've saved PSD files that are bigger than that. So I need the image to be able to investigate.

On editable text: This is the sort of thing that really needs to be available natively in the program. Simon Brown's editable text plugin uses steganography to store the text information in the layer -- clever, but super-super hacky.
  • 0

#42 rslskd

rslskd
  • Newbies
  • 5 posts
  • Reputation:0

Posted 15 January 2011 - 08:09 PM

Here's a problem that I posted to the Troubleshooting & Bug Reporting forum. After getting some suggestions w/no positve result, the moderater said I was in the wrong forum and closed the topic there and sent me here. Here's the initial entry...

"I'm trying to use PDN to open a file from Eaglesoft to repaint their aircraft for Flight Simulator. The file is named ESDG_X_fuse1.psd. When I try to open it in PDN, I get a Paint.NET error message that says, "There was an unspecified error while opening the file." It opens fine in another paint program I have, but that program isn't a good enough program to do the paint I want to do. Your's is, but I can't get past this error message. Am I doing something wrong or do I need some kind of plug-in or what? Help! "

I was told I needed the plug-in that is the topic of this forum. It was already in the File Types folder, but, in case that wasn't the correct one, I replaced it with the latest from the website. That didn't fix the problem. I was told to check to see if the PDN program had the ability to Save As .psd...it does. Then it was suggested that maybe I didn't have the memory necessary to completely load the file w/all the layers. I repsonded that it loads fine in PhotoShopPro and I can see all the layers there. That leads me to believe that memory is not the problem and that there's no problem with the .psd file either.

Any ideas why PDN can't load this file and just presents me with the error message and what I can do to fix it?
  • 0

#43 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 15 January 2011 - 10:39 PM

Memory may very well be the problem. Professional artists often make extensive use of partial layers in Photoshop. I've seen PSD files with thousands of layers.

Paint.NET, however, does not have partial layers. Every layer in Paint.NET is the same size as the full image. You can see how Paint.NET might run out of memory on a certain image that loads up fine in another program.

To check whether memory is the cause of the problem, open up Task Manager and try to load the file. It's pretty obvious -- you'll see memory consumption for Paint.NET shoot up to almost the total memory you have on your PC. Also, since you say it opens in another program (I assume you mean Paint Shop Pro, not PhotoShopPro?), you can count up how many layers are there. I bet it's more than a hundred.

If this is the cause of the problem, Adobe does offer a 30-day trial of Photoshop on their website. Photoshop Elements is also not that expensive.

But if you've performed both these steps and memory is not the cause of the problem, send me the file and I can investigate further. My email address is listed on the Codeplex page for the plugin; I can accept attachments up to 25 MB in size.

Edited by taoyue, 15 January 2011 - 10:40 PM.

  • 0

#44 Serissa

Serissa
  • Newbies
  • 5 posts
  • Reputation:0

Posted 24 April 2011 - 09:24 AM

Hello.

PDN crashes if .psd contains guides (tested with Ps CS2).

PDN v3.5.8.4081.24580
photoshop.dll v1.6

Best regards.
  • 0

#45 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 25 April 2011 - 12:39 AM

Could you supply a PSD file that demonstrates the problem? I cannot reproduce this issue by adding guides to a PSD file that already loaded properly into Paint.NET.

Guides are implemented in the PSD file format as an image resource. The plugin only attempts to process PSD image resources that it understands, and to ignore the others. So it's relatively unlikely that guides would cause a problem.

Of course, there are always edge conditions and unanticipated situations. But it's also possible that there's some other issue with the file that happened to coincide with the use of guides.
  • 0

#46 Serissa

Serissa
  • Newbies
  • 5 posts
  • Reputation:0

Posted 25 April 2011 - 08:28 AM

Ok, that was not guide problem. PDN crashes if all layers empty. Not sure is it dll or pdn fault but thanks for your time anyway.
  • 0

#47 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 26 April 2011 - 12:15 AM

I can't reproduce that problem either. After creating an empty PSD file in Photoshop (with or without adding empty layers on top of the background), it loads fine into Paint.NET.

If you can supply a PSD file that triggers the problem, I can investigate further.
  • 0

#48 Serissa

Serissa
  • Newbies
  • 5 posts
  • Reputation:0

Posted 26 April 2011 - 05:01 AM

I can't reproduce that problem either. After creating an empty PSD file in Photoshop (with or without adding empty layers on top of the background), it loads fine into Paint.NET.

If you can supply a PSD file that triggers the problem, I can investigate further.

I'm not sure about latest versions but in CS2 "background" layer can not be transparent. File shouldn't contain "background" layer to reproduce this crash. Only additional layers. :)

Attached Files

  • Attached File  test.zip   5.23KB   499 downloads

Edited by Serissa, 26 April 2011 - 05:03 AM.

  • 0

#49 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 27 April 2011 - 02:07 AM

Thanks for the repro.

This is a very interesting edge case that you've turned up. I'll have to add some special-casing for images with no background layer. Should be in the next version. (If you send me a PM with your email address, I can give you a private build before then, to test with.)

Edited by taoyue, 27 April 2011 - 02:07 AM.

  • 0

#50 cingo

cingo
  • Newbies
  • 1 posts
  • Reputation:0

Posted 27 May 2011 - 09:03 AM

Update
it is up now....


Hi
Codeplex link is not workin

any alternatives?

Edited by cingo, 27 May 2011 - 09:06 AM.

  • 0

#51 Simon Brown

Simon Brown
  • Members
  • 10,255 posts
  • Reputation:27

Posted 27 May 2011 - 11:16 PM

It works for me. Here's a more direct link.
  • 0
Posted Image

#52 justanother1

justanother1
  • Newbies
  • 1 posts
  • Reputation:0

Posted 26 June 2011 - 01:31 AM

Having a PSD problem here. I'm using the updated plugin and Pdn 3.5.8. I've recently been playing with Sculptris from the Zbrush Central website . In Paint - mode of the program there's an option to export a PSD, edit it, and import it back in to be added to your models texture, which would be a lot of fun, except PDN does not seam to open the document right. It's missing a layer, and I've tried to add a layer and rename, but then Sculptris won't except it. Gimp seems to be able to open and save it fine, except I don't know Gimp. Yes I can use copy and paste between the programs to do for now, however I was hoping someone from here could take a look into this, and at least post your findings, as it's very possible that the problem is not from PDN or the plugin, but from the export from Sculptris, which is still an alpha. Thanks for your time.psd-error-example.jpg

Here's a link t document in question, sorry filesize.....
  • 0

#53 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 27 June 2011 - 12:36 AM

No, the problem is with the plugin, which was originally written to skip all empty layers. I've since changed this behavior to load in all layers, but this was done in April 2011 and the 1.6.0 release is from December 2010. I still have some things to complete before the next release, but if you PM me your email address, I can send you a private build to use in the interim.

There seems to be another problem with this file that you didn't mention: the circle looks gray in Paint.NET but green in Photoshop. This is because the "shade" layer uses the "hard light" blend mode, which does not exist in Paint.NET. This problem is still going to exist -- but perhaps it's not a problem for your particular use case.
  • 0

#54 LHammonds

LHammonds
  • Newbies
  • 2 posts
  • Reputation:1

Posted 01 July 2011 - 02:15 PM

Hello and thanks for creating this plugin. It has saved me from a bunch of trouble by allowing me to view/edit my various PSD source images on machines that do not have Photoshop installed on it.

If I can make a suggestion, please include readme files in your archives. They are very important since they will become detached from their source location (such as this thread).

Including a readme can provide very helpful information as well as keeping credits with the file and your permissions/licensing info too.

Here is a readme file I put together and have with my local copy. Feel free to use.

Name: PhotoShop Plugin
Version: 1.6.0
Date: 12/28/2010
Category: Plugin
Cost: Free (Open Source)
Requirements: Paint.NET 2.6+
Author: Originally written by Frank Blumenberg in 2006, maintained by Tao Yue since 2010
Source: http://frankblumenberg.de/doku/doku.php?id=paintnet:psdplugin
Download: http://psdplugin.codeplex.com/

Description
-----------
This plugin allows you to open and save Adobe Photoshop files (.PSD)

Installation
------------
Copy the PhotoShop.dll to the “FileTypes” sub-folder in the Paint.NET installation directory.

Example:

C:\Program Files\Paint.NET\FileTypes\PhotoShop.dll

The next time you start Paint.NET, you will see a new option in the Open and Save dialog boxes: "Photoshop (*.psd)"

Features
--------
 * Loading and Saving
   - Layers
   - RLE-compression
   - 32 bit-RGBA colorspace 

 * Load-only
   - Photoshop .PSD files with the following colorspaces are converted to RGBA on load:
     -> Bitmap
     -> Grayscale
     -> Duotone (color information discarded, treated as grayscale)
     -> Indexed
     -> CMYK
     -> Multichannel CMY
     -> Lab 
   - Masks are applied to the layer on load. Vector masks are ignored.

A permission section can clarify your wishes regarding what license you want this under or just to clarify if you mind others making changes or hosting the file at other sites, etc.

Thanks,
LHammonds
  • 0
FYI - I'm not using signature for "signature" links since it can get you banned on this site.

#55 midora

midora
  • Members
  • 772 posts
  • Reputation:88

Posted 16 July 2011 - 05:56 AM

Layer names containing german umlauts are corrupted when I save to .psd and load the .psd again.

I checked the source and figured out that the plugin just reads and writes the names in pascal format.

I checked the psd specification and it tells that a unicode layer name can be stored in the "Additional Layer Information" area.

Would be nice if this could be implemented.


Unicode layer name (Photoshop 5.0)

Key is 'luni' . Data is as follows:


Unicode Layer name
Length

Description

Variable

Unicode string (4 bytes length + string).


  • 0
Posted Image

#56 taoyue

taoyue
  • Members
  • 50 posts
  • Reputation:6

Posted 22 July 2011 - 10:39 PM

Thanks for the bug report and the investigation.

I've just committed changeset 1c3b7fb44cc0, adding proper handling of Unicode layer names.
  • 0

#57 midora

midora
  • Members
  • 772 posts
  • Reputation:88

Posted 23 July 2011 - 02:48 PM

Thanks for the bug report and the investigation.

I've just committed changeset 1c3b7fb44cc0, adding proper handling of Unicode layer names.


Works for me now, thanks from Switzerland.

You forced me to install MS Visual C# Express to compile the changeset.
But because I like to do a pdf plugin next, this was an open issue on my list. ;-)
Let's see how much time it takes to get into this c# stuff.
  • 0
Posted Image

#58 midora

midora
  • Members
  • 772 posts
  • Reputation:88

Posted 23 July 2011 - 04:03 PM

Thanks for the bug report and the investigation.

I've just committed changeset 1c3b7fb44cc0, adding proper handling of Unicode layer names.


There seems to be a small issue. I saved a file with two layers and analyzed the result (just to see what you are doing ;-)

Hidden Content:


As you can see from the screenshot there are two 'luni' blocks per layer record.
So each layers gets the correct unicode name but twice.

Edited by pyrochild, 23 July 2011 - 08:42 PM.

  • 0
Posted Image

#59 midora

midora
  • Members
  • 772 posts
  • Reputation:88

Posted 23 July 2011 - 08:23 PM

Resolution issues

From my knowledge
this.m_hRes = reader.ReadInt16();
this.m_hResUnit = (ResUnit)reader.ReadInt32();
must be
this.m_hRes = reader.ReadInt32();
this.m_hResUnit = (ResUnit)reader.ReadInt16();
Also the writer

OnLoad: hResUnit is ignored and the plugin expects that hRes and vRes contain dpi values.
OnSave: if input.DpuUnit is not inch then the code is incomplete and may be wrong.
  • 0
Posted Image

#60 pyrochild

pyrochild
  • Administrators
  • 11,498 posts
  • LocationColorado
  • Reputation:205

Posted 23 July 2011 - 08:43 PM

Why are you posting raw PNG data as text?
  • 0
xZYt6wl.png
ambigram signature by Kemaru

[I write plugins and stuff]

If you like a post, upvote it!