PsDotNet - Photoshop C# library

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

davidwright
Posts: 4
Joined: Fri Jan 13, 2017 7:56 am

PsDotNet - Photoshop C# library

Post by davidwright »

Greetings, I wanted to let the community about a C# library that I have been working on that might be useful and of interest.

PsDotNet is a strongly typed, intuitive, C# library to assist in automating operations in Adobe Photoshop. It was created out of a need to use other C# libraries and external data to create art content.

Its currently in Beta and I would love to get more eyes on it to see where it might be improved. To get an idea of its capabilities feel free to take a look at the http://psdotnet.com/getting-started/ documentation for some basic code snippets.

You can download the latest build from http://psdotnet.com.

Look forward to seeing what you think.
Cheers!
User avatar
Jaroslav Bereza
Posts: 38
Joined: Tue Dec 27, 2016 7:22 pm

Re: PsDotNet - Photoshop C# library

Post by Jaroslav Bereza »

This looks very interesting. I will check it in next days.
Is this Windows only? Because if you write classic JSX, it works on both Mac and Win.
davidwright
Posts: 4
Joined: Fri Jan 13, 2017 7:56 am

Re: PsDotNet - Photoshop C# library

Post by davidwright »

I agree JSX is still the better option cross platform. This was developed for specific use cases which happened to be only on Windows and as such has only been used\tested there. I agree it's niche, but might be useful for developers like myself. :)
Cheers
User avatar
Jaroslav Bereza
Posts: 38
Joined: Tue Dec 27, 2016 7:22 pm

Re: PsDotNet - Photoshop C# library

Post by Jaroslav Bereza »

C# is becoming more crossplatform. You can have Visual Studio on Mac. There is also mono. I think microsoft is preparing more cross platform things.
mid85549
Posts: 4
Joined: Sat Aug 19, 2017 2:07 am

Re: PsDotNet - Photoshop C# library

Post by mid85549 »

- how to export image from layer? :?:
- please shared link PsDotNet.Listener.exe
mid85549
Posts: 4
Joined: Sat Aug 19, 2017 2:07 am

Re: PsDotNet - Photoshop C# library

Post by mid85549 »

mid85549 wrote:- how to fast export image from layer? :?:
- please shared link PsDotNet.Listener.exe
;)
- Method document.GetAllLayers() run slow to normal file
mid85549
Posts: 4
Joined: Sat Aug 19, 2017 2:07 am

Re: PsDotNet - Photoshop C# library

Post by mid85549 »

close document application throw Documents :?
davidwright
Posts: 4
Joined: Fri Jan 13, 2017 7:56 am

Re: PsDotNet - Photoshop C# library

Post by davidwright »

Hey mid85549,
First off thanks for checking it out!

Could you tell me which version of Photoshop you are using?

I created a image with 60 or so layers to test out your reported document.GetAllLayers() slowness, and it returned the list in 0.1800872 ms. How complex is the .psd you had this slowness on? Is it on all documents that you try?

If I understand you correctly, you are reporting that when you call the document.Close() method it throws and exception? Can you tell me the exception that it throws and any info contained within? This will help me track down what might be causing it.

Feel free to post code snippets that are causing you issues.

Thanks!
mid85549
Posts: 4
Joined: Sat Aug 19, 2017 2:07 am

Re: PsDotNet - Photoshop C# library

Post by mid85549 »

hi davidwright,
i using photoshop cc 2017
i used foreach GetAllLayers() convert from ExportLayer.jsx it set Visiable and SaveAs CreatePNGSaveOptions so slow. But in photoshop cc 2017 support QuickExportLayer by id it one forloop :D
Image
upload picture

throw in close document and reopen file
____________________
Image
Image


track
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at PsDotNet.Base.Extensions.GetHashCodeOrId(Document document)
at PsDotNet.Base.PsDocument.GetHashCode()
at PsDotNet.Base.Collections.PsDocuments.get_NeedsRefresh()
at PsDotNet.Base.PsApplication.get_Documents()
at PsDotNet.Base.PsApplication.Open(String filePath, Boolean asSmartObject, Object asType)
at TestLibraryPsd.OpenAndExportLayers..ctor() in f:\BasicLight\TestLibraryPsd\OpenAndExportLayers.cs:line 24
LitaMiller
Posts: 3
Joined: Sun Sep 17, 2017 5:20 am
Location: CA

Re: PsDotNet - Photoshop C# library

Post by LitaMiller »

it looks good, materials are free?