Photoshop: how to open a document ?

  • Thread starter Thread starter Lionel
  • Start date Start date
L

Lionel

Hi,

I am trying to open a Photoshop document with the Photoshop (COM) reference.

Photoshop.Application appRef = new Photoshop.Application();

Photoshop.Document docRef;

docRef=appRef.Open("c:\test.jpg");

C# is waiting for an Object argument after the "c:\test.jpg" in the Open
fonction.

I don't know wich parameter i have to put there.

Any idea ?

Thanks
 
Default filetype in PS is the *.psd file. If you wish to open PDF, EPS, or
RAW filetypes you need to specify the appropriate options, but for jpeg
Application.Open("image.jpg"); should work. Try opening a .psd file and see
if your script program works and then try opening other jpg images, or
saving your jpg with different settings.

ok,
aq
 
but for jpeg Application.Open("image.jpg"); should work.

The Open fonction takes 2 arguments (*No overload for method 'Open' takes
'1' arguments* is the error returned...), even for the jpg files.
If i try to assign a null value to the second argument, i have the is error:
Enumerated Value Expected.

Thanks for taking time.
 
Back
Top