<div dir="ltr"><div><div><div>Thanks for your kind reply. Yes, it seemed it worked with an older version than 3.x<br><br></div>I got the following output:<br><br>Process finished with exit code 0<br></div><br></div>So, what is the purpose of open() here? <br><br>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 12:31 AM, Terry Reedy <span dir="ltr"><<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/16/2014 2:37 PM, Abdul Abdul wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I'm trying to open an image using the `Python Imaging Library` as follows:<br>
<br>
from PIL import Image<br>
img = Image.open('xyz.jpg')<br>
<br>
But, got the following error:<br>
<br>
File "C:/Users/abc/PycharmProjects/<u></u>untitled/open_image.py", line 2, in<br>
<module><br>
     from PIL import Image<br>
   File "C:\Python34\lib\site-<u></u>packages\PIL\Image.py", line 62, in <module><br>
</blockquote>
<br></span>
Answer is on line above.  Good for you for posting traceback.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     from PIL import _imaging as core<br>
ImportError: DLL load failed: %1 is not a valid Win32 application.<br>
<br>
Why is that? How can I solve this issue?<br>
</blockquote>
<br></span>
PIL does not work with 3.x.  Get pillow instead.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Terry Jan Reedy<br>
<br>
-- <br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>