psdplugin / psdplugin Goto Github PK
View Code? Open in Web Editor NEWPSD file support for .NET applications
License: Other
PSD file support for .NET applications
License: Other
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.
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.
this plugin is really useful. but recently some .psd files I've recieved through discord fail to open
see image above
odd thing is that irfanview has no issue opening it, so it's definitely an issue on this plugin's end
here's the file itself just in case you want tot try it out
https://drive.google.com/file/d/1NlDJSVud6Ub5FLkkqf3V4YXjB7eGK4BM/view?usp=sharing
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!)
Newest Paint.NET 4.3 retargets to .NET 5.0, so I think another update here is required for that.
Hi,how do I get text info from .psd file ,I try to decode more info refrencing this page ,https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577411_21585, but there is no ‘tySh’ in layers, only the 'TySh' 'supersedes the type tool info in Photoshop 5.0' but I cannot get text info in 'TySh' layer info ,I wonder if you had done it ? Any help is appriciatied !
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.
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 !
Hi,
I have small size file with 21 layers, nothing special (effects, colors ...) - see attached zip.
It has been stored by Photopea.
An exception occurs when opened - see attached txt.
exception dump.txt
!koleje otvírací doby Pozadí -FINAL CZ EN-pdn.zip
Hope it will help me and others.
Thank you
Radek
The last version is from 2016, an new soon?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.