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!
PsDotNet - Photoshop C# library
- Jaroslav Bereza
- Posts: 38
- Joined: Tue Dec 27, 2016 7:22 pm
Re: PsDotNet - Photoshop C# library
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.
Is this Windows only? Because if you write classic JSX, it works on both Mac and Win.
-
- Posts: 4
- Joined: Fri Jan 13, 2017 7:56 am
Re: PsDotNet - Photoshop C# library
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

Cheers
- Jaroslav Bereza
- Posts: 38
- Joined: Tue Dec 27, 2016 7:22 pm
Re: PsDotNet - Photoshop C# library
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.
Re: PsDotNet - Photoshop C# library
- how to export image from layer? 
- please shared link PsDotNet.Listener.exe

- please shared link PsDotNet.Listener.exe
Re: PsDotNet - Photoshop C# library
mid85549 wrote:- how to fast export image from layer?
- please shared link PsDotNet.Listener.exe

- Method document.GetAllLayers() run slow to normal file
Re: PsDotNet - Photoshop C# library
close document application throw Documents 

-
- Posts: 4
- Joined: Fri Jan 13, 2017 7:56 am
Re: PsDotNet - Photoshop C# library
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!
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!
Re: PsDotNet - Photoshop C# library
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

upload picture
throw in close document and reopen file
____________________


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


upload picture
throw in close document and reopen file
____________________


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
-
- Posts: 3
- Joined: Sun Sep 17, 2017 5:20 am
- Location: CA
Re: PsDotNet - Photoshop C# library
it looks good, materials are free?