Proposal: PSD support
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have verified that I am running the latest version of ImageSharp
- [X] I have verified if the problem exist in both
DEBUGandRELEASEmode - [X] I have searched open and closed issues to ensure it has not already been reported
Description
If at some point there's interest in supporting Adobe PSD, in the past I've used this library: http://psdplugin.codeplex.com/
It's a full featured, pure .Net PSD library. It is the current Paint.Dot.Net plugin to load/save PSD, but the core of the library is stand alone and has no dependencies with Paint.Dot.Net
I used it in the past and it's quite complete and safe to use.
It's covered under MIT license but some bits are borrowed from http://www.codeproject.com/KB/graphics/PSDParser.aspx and that's under http://www.opensource.org/licenses/BSD-3-Clause
source: http://psdplugin.codeplex.com/SourceControl/latest#License.txt
so legally it should be ok (according to my 2min google session)
BUT don't get your hopes up @vpenades the amount of things that are on the TODO list is long! and given the fact that a PSD file can have many layers is also going to be a design issue
@JimBobSquarePants +1 for psd support! Also would be nice to support DDS files
Updated link for GitHub repo.
https://github.com/PsdPlugin/PsdPlugin
While this is most certainly something for the future. We should actually have a look at our API now to ensure that we can implement layering in a sane way that works with our existing codecs.
CC/ @tocsoft @antonfirsov @dlemstra
I would suggest splitting formats by usage:
- Main "consumer" formats like GIF, PNG, JPEG, would stay in the main assembly.
-
ImageSharp.EditableFormatsfor Edition/proffesional formats, like PSD, Krita, etc... -
ImageSharp.LegacyFormatsfor PCX, TGA, etc -
ImageSharp.GPUFormatsfor hardware accelerated formats like DDS
That would allow adding specialised support for each format group, without clogging the main namespace.
For example, GPU Formats will probably require:
- CubeMap class to hold 6 images and serializable by the format encoders/decoders.
- Mipmap/Anisotropic generation support.
- Probably, some sort of additional processors for handling normal maps and other exotic texture maps.
Professional formats assembly could hold the specialised layering and composition infrastructure.
I was looking for this tonight for a little tool I'm making to interlace images to produce lenticular prints. In my use case, I'd just want the ability to load a PSD into separate Image<Rgba32> objects for each layer. Blend modes, masks, transparency, etc. would be "nice to have" access to, but really I'm just looking for a stack of individual layers.
Also would be nice to support DDS files
Paint.NET's DDS support is now sourced from @0xC0000054 's DdsFileTypePlus plugin, https://github.com/0xC0000054/pdn-ddsfiletype-plus . This could probably be adapted into something for ImageSharp.
However, it's a Windows-only solution because it uses DirectXTex and DirectCompute. It does encoding of some formats on the GPU (or via WARP).
@rickbrew I might be able to help you here actually. We have a complete (@UkooLabs I'm right it is complete yeah?) DDS format implementation in this side project ImageSharp.Textures.
I've not been able to put any focus on this library at all. Peter has done an absolute ton of work though and I'd like to get things ticking along if I can now we have a stable base library.
Oh -- I don't need help, I was just replying to the earlier comment. Thanks though!
@JimBobSquarePants Imagesharp.Textures is waiting me to come back to it, still need to sort more in the Pixel Format area but there are some dds format variants correctly decoding so far.
@UkooLabs Let me know what you need!