Git Product home page Git Product logo

psdplugin's Introduction

Photoshop PSD FileType Plugin for Paint.NET


Description
------------

This plugin allows Paint.NET to load and save Photoshop .PSD files.

Perfect round-trip compatibility is possible for features that are
common to both Paint.NET and Adobe Photoshop.  Other features are
preserved with varying levels of visual fidelity.

For more details, or to report bugs, please refer to the website:
  https://www.psdplugin.com/


Installation
-------------

1. Exit all instances of Paint.NET.
2. Copy Photoshop.dll into the C:\Program Files\Paint.NET\FileTypes
   directory.
3. Restart Paint.NET, which will automatically detect the plugin.

A copy of Paint.NET can be obtained from the official website:
  http://www.getpaint.net/


Licensing
----------

This software is open-source, under the MIT and BSD licenses.  Please see
LICENSE.TXT for complete licensing and attribution information.

psdplugin's People

Contributors

taoyue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psdplugin's Issues

Support for layer comps

Hi,

Would it be possible to add support for layer comps to the plugin in some way? Or is that outside of the scope of this plugin?

Thanks, Rogier.

Crash on images with complex layer masks

Thank you for this excellent project.

I get a hard crash on the latest Paint.NET (4.1.5) with the latest version of this plugin (2.5.0), when attempting to load this image from the psd-tools test library:

https://github.com/psd-tools/psd-tools/blob/master/tests/psd_files/layer_mask_data.psd

The paint.net error dialog reports:

Application version: paint.net 4.1.5

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

at PhotoshopFile.Channel.get_Rect()

at PhotoshopFile.Channel.LoadPixelData(PsdBinaryReader reader)

at PhotoshopFile.PsdFile.LoadLayers(PsdBinaryReader reader, Boolean hasHeader)

at PhotoshopFile.PsdFile.LoadLayerAndMaskInfo(PsdBinaryReader reader)

at PhotoshopFile.PsdFile.Load(Stream stream, LoadContext loadContext)

at PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load(Stream input)

at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 495

at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

I think the problem may lie in the way the "Layer mask / adjustment layer data" segment is parsed in Mask.cs. Adobe's spec has multiple errors in this section so it gets confusing, but in particular, the If statement on line 134 of Mask.cs:

// User mask is supplied separately when there is also a vector mask.
if (maskLength == 36)
{

...is incorrect, I think. In this PSD file, the layer mask segment is larger than 36 bytes (56 bytes), a condition the spec doesn't state explicitly but which is obviously possible if bit 4 of the Flags byte is set (which tells you to read a separate Parameter byte, which has additional flags indicating the presence of even MORE optional data). I'm also fairly certain the parameter byte and optional data follows the Real User Mask segment, rather than occurring it before it as the spec implies. (At least, this results in plausible data for all parsed values - but I don't have a copy of Photoshop to test more fully.)

Regardless, I believe the correct code should read something like:

// User mask is supplied separately when there is also a vector mask.
if (maskLength >= 36)
{

...to cover this case. This prevents the current problem where the Real User Mask data is present, but ignored by the parser, likely causing the null rect at the source of the crash.

(The crash may also be caused by something else entirely, but hopefully this helps narrow it down a bit!)

Keep PSD layer groups/folders compatability

I know that Paint.NET has only one level of layers but while you import layers like groups "Layer Group: {0}" and "End Layer Group: {0}" it would be perfect to restore original layers when saved!

I use both programs and as user I am not aware that photoshop file will become flat.
Please add checkbox "keep layers" to preserve existing layers when file is saved.

donation using PayPal: not possible ?

fyi: I just tried to send you a small donation and got an error message saying donations were not supported in "this country." I am in Thailand.

Thanks for this excellent plug-in !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.