PsDotNet - Photoshop C# library

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

Moderators: xbytor, DavideBarranca, Paul MR

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

PsDotNet - Photoshop C# library

Postby davidwright » Fri Jan 13, 2017 8:23 am

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: 34
Joined: Tue Dec 27, 2016 7:22 pm
Contact:

Re: PsDotNet - Photoshop C# library

Postby Jaroslav Bereza » Fri Jan 13, 2017 6:14 pm

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.
Magic Scripts for Photoshop

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

Re: PsDotNet - Photoshop C# library

Postby davidwright » Fri Jan 13, 2017 9:55 pm

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: 34
Joined: Tue Dec 27, 2016 7:22 pm
Contact:

Re: PsDotNet - Photoshop C# library

Postby Jaroslav Bereza » Sat Jan 14, 2017 12:26 pm

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.
Magic Scripts for Photoshop

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

Re: PsDotNet - Photoshop C# library

Postby mid85549 » Sat Aug 19, 2017 2:10 am

- 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

Postby mid85549 » Sat Aug 19, 2017 1:55 pm

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

Postby mid85549 » Tue Aug 29, 2017 10:44 am

close document application throw Documents :?

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

Re: PsDotNet - Photoshop C# library

Postby davidwright » Wed Aug 30, 2017 1:48 am

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

Postby mid85549 » Thu Sep 07, 2017 2:47 am

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: 2
Joined: Sun Sep 17, 2017 5:20 am
Location: CA
Contact:

Re: PsDotNet - Photoshop C# library

Postby LitaMiller » Sun Sep 17, 2017 5:25 am

it looks good, materials are free?


Return to “Photoshop Scripting - General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest