SixLabors / ImageSharp

:camera: A modern, cross-platform, 2D Graphics library for .NET
https://sixlabors.com/products/imagesharp/
Other
7.48k stars 851 forks source link

Proposal: PSD support #158

Open vpenades opened 7 years ago

vpenades commented 7 years ago

Prerequisites

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.

KLuuKer commented 7 years ago

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

Krakean commented 6 years ago

@JimBobSquarePants +1 for psd support! Also would be nice to support DDS files

JimBobSquarePants commented 6 years ago

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

vpenades commented 6 years ago

I would suggest splitting formats by usage:

That would allow adding specialised support for each format group, without clogging the main namespace.

For example, GPU Formats will probably require:

Professional formats assembly could hold the specialised layering and composition infrastructure.

richardtallent commented 5 years ago

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.

rickbrew commented 4 years ago

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).

JimBobSquarePants commented 4 years ago

@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.

rickbrew commented 4 years ago

Oh -- I don't need help, I was just replying to the earlier comment. Thanks though!

UkooLabs commented 4 years ago

@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.

JimBobSquarePants commented 4 years ago

@UkooLabs Let me know what you need!