taoyue

Photoshop PSD file plugin (newest version: 2.5.0)

257 posts in this topic

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.post-83979-130905144535_thumb.jpg

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

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks for the bug report and the investigation.

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

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Why are you posting raw PNG data as text?

I pasted the image from the Windows clipboard into the forum editor and it looked as expected. Pressing "Add Reply" changed it to this text representation. I tried to change this by editing the post. But entering the forum editor the image was ok again. So I thougth to ask in the support forum what is going wrong. Any hint?

0

Share this post


Link to post
Share on other sites

midori: the best way to include images on this forum is to attach them. (Use the full editor -- the quick reply editor doesn't have the Attach function.) This allows the images to be viewed immediately in a web browser, without having to copy-paste to a temporary file and then decode.

I took a look at your screenshot. In my testing, I have not seen duplicate "luni" resources in a hex editor. If you have a .PDN file that can reliably reproduce the problem when saved out to a .PSD, then I can investigate further.

I filed bug 7963 in Codeplex to track the ResolutionInfo problems. Since you're a programmer, you might consider filing bugs directly in Codeplex in the future.

0

Share this post


Link to post
Share on other sites

midori: the best way to include images on this forum is to attach them. (Use the full editor -- the quick reply editor doesn't have the Attach function.) This allows the images to be viewed immediately in a web browser, without having to copy-paste to a temporary file and then decode.

Strange that the forum editor allows to paste and show a screenshot but then later does not show it in the post. Saving and attaching is a little bit more work.

I took a look at your screenshot. In my testing, I have not seen duplicate "luni" resources in a hex editor. If you have a .PDN file that can reliably reproduce the problem when saved out to a .PSD, then I can investigate further.

It is easy to reproduce here (pdn 3.5.8). Create a new image in pdn add a second layer and save it as .psd. Just with a simple hex editor I see four lunis instead of two.

0

Share this post


Link to post
Share on other sites

Duplicate Unicode layer names: fixed in changeset b4e2cc01eebc.

Checked. No duplicates anymore. Thanks.

0

Share this post


Link to post
Share on other sites

Proposal: Add a checkbox to add the composite image to the file or not (on save).

0

Share this post


Link to post
Share on other sites

Strange that the forum editor allows to paste and show a screenshot but then later does not show it in the post.

I think that's just your browser, mate. I can't do it.

0

Share this post


Link to post
Share on other sites

I think that's just your browser, mate. I can't do it.

I'm using Firefox 5.0.

Anyway I will avoid this in the future as long as the pasted image is visible in the forum editor but not in "Preview Post".

0

Share this post


Link to post
Share on other sites

Announcing the release of version 2.0 of the PSD plugin for Paint.NET. Now posted on Codeplex: http://psdplugin.codeplex.com/

Please note that this is a .0 release that includes substantial refactoring of the underlying code. Substantial regression testing has been performed, but there may still be bugs. As always, please report any problems on the forum or via Codeplex.

Major new features:

  • Higher color-depth images can be loaded. Since Paint.NET represents images using 32-bit color (8 bits/channel):
    • 16 bits/channel images will lose some precision.
    • 32 bits/channel images will be truncated to the standard dynamic range.

    [*]ZIP-compressed images can now be loaded.

    • Newer versions of Photoshop use this type of compression for 16 bits/channel and 32 bits/channel images.
    • Older versions of Photoshop also offered this as an option for 8 bits/channel images.

Bugfixes and other minor changes:

  • Empty layers are now preserved on load and save.
  • Layer names can now contain Unicode characters.
  • Several mismapped layer blend modes are now mapped correctly between Paint.NET and PSD: Color burn, Color dodge, and Additive.
  • Somewhat faster saving of images when a large portion of a layer is non-transparent.
  • PSD files created by Adobe Photodeluxe are no longer blocked from loading.
  • The plugin will now verify that sufficient memory exists to load a .PSD file into Paint.NET. The user will get an out-of-memory error, rather than experience an apparent hang as the disk thrashes from virtual memory paging.

Bugs reports and suggestions from the following users were incorporated in this release: Aleksandr Zamerov, LHammonds, midora, rsiskd, Serissa. Thank you for helping to make the plugin better for everyone!

0

Share this post


Link to post
Share on other sites

I think I'm installing the plugin wrong, because it still won't let me open up .psd files...

I know that part should be easy, but I don't know. Which folder is the filetype folder?

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