title: Python Scripting for Photoshop - resizeImage not working as expected
body: <p>I'm trying to perform a simple operation.  Resizing an image I have loaded up in photoshop.</p>
  
  <p>This is my code</p>
  
  <pre><code>    psApp.Open(psdFiles[0])  # Opens the PSD
      awayActiveDoc = psApp.Application.ActiveDocument  # Get active document object
  
      #Set units to pixels.
      psApp.Preferences.RulerUnits = 1
  
      #Printing out a bunch of info for the loaded doc.
      print "\n Active document:", awayActiveDoc.name
      print " Initial Doc size:", int(awayActiveDoc.width), int(awayActiveDoc.height)
      print " Doc path:", awayActiveDoc.path
      print " Doc BitsPerChannel:", awayActiveDoc.BitsPerChannel
  
      awayActiveDoc.Flatten()
      awayActiveDoc.resizeImage("51%", "51%")
  </code></pre>
  
  <p>And this is the illegal operation I'm getting when attempting to resize the image.  Any ideas?</p>
  
  <blockquote>
    <p>File "e:\py_projects\py_crowd\test2.py", line 73, in 
      awayActiveDoc.resizeImage("51%", "51%")
    File "C:\Python27\Lib\site-packages\win32com\client\dynamic.py", line 511, in <strong>getattr</strong>
      ret = self.<em>oleobj</em>.Invoke(retEntry.dispid,0,invoke_type,1)</p>
    
    <p>pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, u'Adobe >Photoshop', u'Illegal Argument', None, 0, -2147024809), None)</p>
  </blockquote>