I am trying to run photoshop action script using C# console application but it is resulting in and error
System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM
class factory for component with CLSID {99AEA70E-4D13-44BF-A878-33345CBFCBC8} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
My code is
public static void RunAction(string orig, string target, string action, string group)
{
try
{
ApplicationClass app = new ApplicationClass();
var doc = app.Open(orig);
app.DoAction(action, group);
var options = new BMPSaveOptions();
doc.SaveAs(target, options, true, PsExtensionType.psLowercase);
doc.Close(PsSaveOptions.psDoNotSaveChanges);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Console.ReadLine();
throw;
}
}
RunAction(@"D:\ImageValidation\source\original.jpg", @"D:\ImageValidation\Destination\original1.jpg", "Resize", "Default");
I want to run a action script using C# Application that can perform some action on all images in the folder. But currently I am doing for single image.
User contributions licensed under CC BY-SA 3.0