I tried many solutions posted on the network, they do not work.
>>> import _imaging >>> _imaging.__file__ 'C:\\python26\\lib\\site-packages\\PIL\\_imaging.pyd' >>>
Thus, the system can find _imaging, but still cannot use the truetype font
from PIL import Image, ImageDraw, ImageFilter, ImageFont im = Image.new('RGB', (300,300), 'white') draw = ImageDraw.Draw(im) font = ImageFont.truetype('arial.ttf', 14) draw.text((100,100), 'test text', font = font)
Causes this error:
ImportError: The _imagingft C module is not installed File "D:\Python26\Lib\site-packages\PIL\ImageFont.py", line 34, in __getattr__ raise ImportError("The _imagingft C module is not installed")
python image python-imaging-library
user483144 Oct 25 '10 at 3:21 2010-10-25 03:21
source share