Given the following code I get an COM error message saying:
"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Cannot open the file because the open options are incorrect"
I cannot see how it is wrong, can someone clarify it for me?
BR
Thomas Moltzen-Bildsøe
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Photoshop; class Program { static void Main(string[] args) { PhotoshopApp myBot = new PhotoshopApp(); myBot.loadFile(); } } public class PhotoshopApp { private Application PSDapp; public PhotoshopApp() { PSDapp = new Application(); } public void loadFile() { CameraRAWOpenOptions raw = new CameraRAWOpenOptions(); raw.Contrast = 1; raw.Exposure = 0.5; String myFile = @"c:\Users\thbd\Documents\Visual Studio 2015\Projects\fremkaldPS\fremkaldPS\tilmelding.png"; PSDapp.DisplayDialogs = PsDialogModes.psDisplayNoDialogs; PSDapp.Open(myFile, raw, false); } }