Search code examples
c#photoshopphotoshop-script

What Type of photoshop Document.add?


I referenced PhotoShop cs5 object Library COM in C#,but I don't know what type of "document.add()" I should use!

Photoshop.ApplicationClass app = new ApplicationClass();// start ps engine
app.Load(openFileDialog1.FileName);       //load image with ps engine   
app.Documents.Add([Object.Width == Type.missing],// Anybody knows ? 
                  [Object.Height== Type.missing],//what type of these params?
                  [Object.Resolution== Type.missing],//type ?
                  [Object.Name== Type.missing],//type ?
                  [Object.PixelAspectRatio== Type.missing],//type ?
                  [Object.Mode== Type.missing],//type ?
                  [Object.InitialFill== Type.missing],//type ?
                  [Object.BitsPerChannel== Type.missing],//type ?
                  [Object.ColorProfileName == Type.missing])//type ?

Solution

  • Get the appropriate Reference for your version of Photoshop here: http://www.adobe.com/devnet/photoshop/scripting.html

    In the JavaScript Reference for CS5 http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs5_javascript_ref.pdf Pg 104 lists the add method for the Documents object. It also lists the parameters and their types.