CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 11-27-2008, 08:23 AM   #1
Paul Sultan
Animation TA
New York University
Syosset, USA
Join Date: Apr 2005
Posts: 44
Python Thumbnail Generator

Hey everyone I'm having some difficulty integrating the PIL python module to generate thumbnails of my rendered frames.

I've set up my maya.env to use the activepython 2.5 interpreter.
MAYA_LOCATION = C:\Program Files\Autodesk\Maya8.5;
PYTHONPATH = C:\Python25\Lib\site-packages;

My python code is:
import os
import glob
from PIL import Image

for infile in glob.glob("*.jpg"):
print infile;
im =
im.thumbnail((128, 128), Image.ANTIALIAS);
print im.format

If I remove the thumbnail() function I still get the format so it seems like PIL is functioning correctly however once i add the thumbnail function i get long error:
# Error: The _imaging C module is not installed
# Traceback (most recent call last):
# File "<maya console>", line 10, in ?
# File "C:\Python25\Lib\site-packages\PIL\", line 1522, in thumbnail
# self.load()
# File "C:\Python25\Lib\site-packages\PIL\", line 155, in load
# self.load_prepare()
# File "C:\Python25\Lib\site-packages\PIL\", line 223, in load_prepare
# =, self.size)
# File "C:\Python25\Lib\site-packages\PIL\", line 36, in __getattr__
# raise ImportError("The _imaging C module is not installed")
# ImportError: The _imaging C module is not installed #

If anyone has any experience with maya and PIL or have any other method of producing thumbnails from maya please let me know.
Old 11-27-2008, 09:59 AM   #2
Paul Sultan
Animation TA
New York University
Syosset, USA
Join Date: Apr 2005
Posts: 44
I think a main issue is the maya.env is not changing maya's behavior since when i type help(); in maya it still tells me im using Python 2.4 (the version installed with maya 8.5). is that the proper way to set up the maya.env to use a external interpreter?
Old 11-27-2008, 09:59 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:29 PM.

Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.