title: Resize images in Maya with Python
body: <p>I'm pretty new to coding in general. I want a script that could batch process images inside Maya. The process should be simple: open an image from a given path folder, resize it, overwrite it.</p>
  <p>I know PIL should be able to do that, however it appears so it's not supported since Maya 2014 or something. I've tried the code in Maya 2012 and it works but since I want my code to be accessible to all, I want to find a workaround.</p>
  <p>I'm aware someone re-released a module so it can be supported on more recent builds (on windows only though).</p>
  <p><a href="http://mistermatti.wordpress.com/2014/02/04/maya-2014-with-pythons-pil-module/" rel="nofollow noreferrer">http://mistermatti.wordpress.com/2014/02/04/maya-2014-with-pythons-pil-module/</a></p>
  <p>But even when I install it in my build, I get this error when attempting to open my file:</p>
  <pre><code>open(&quot;E:/SoNuchframe000-00000.png&quot;)
  </code></pre>
  <blockquote>
  <p>cannot identify image file</p>
  </blockquote>
  <p>I've tried copying the whole module into my own script and it does the same thing.</p>
  <p>On the side I've also tried the OpenMaya module</p>
  <pre><code>    image.readFromFile('E:/SoNuchframe000-00000.png')
      image.resize(2048, 2048, False)
      image.writeToFile('E:/SoNuchframe000-00000.png' + 'Resized.png')
  </code></pre>
  <p>and this gives me an empty image of 12mb (so by the way, if I could keep it compressed, that would be awesome).</p>
  <p>So now, I've reached the limit of my powers. What can I do from here?</p>