proble loading font

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

proble loading font

ariel goldstien
Hi.
My name is Ariel Goldstien I work at The Hebrew university laboratory.
I am trying to write a Hebrew string to a BMP. and I keep getting "The _imaging C module is not installed" despite the fact that I have managed to import _imaging.
this is the code:
import Image
import ImageDraw
import ImageFont
import _imaging
 
a=u'1אריאל' #u'..' converts to Unicode
font = ImageFont.truetype('c:/mriam.ttf',24) #standard Hebrew font, this line throws the error
im=Image.new('RGB',(200,200),(100,100,100))
d=ImageDraw.Draw(im)
d.text((0,0),a)
im.show()
I have spent more than 3 dayes trying to figure it out. any help would be very appriciated

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: proble loading font

Fredrik Lundh
What platform is this?  If you start a Python interpreter and write:

    >>> import Image
    >>> Image.core

what does it output?

</F>

On Wed, Feb 3, 2010 at 10:06 AM, ariel goldstien
<[hidden email]> wrote:

> Hi.
> My name is Ariel Goldstien I work at The Hebrew university laboratory.
> I am trying to write a Hebrew string to a BMP. and I keep getting "The
> _imaging C module is not installed" despite the fact that I have managed to
> import _imaging.
> this is the code:
> import Image
> import ImageDraw
> import ImageFont
> import _imaging
>
> a=u'1אריאל' #u'..' converts to Unicode
> font = ImageFont.truetype('c:/mriam.ttf',24) #standard Hebrew font, this
> line throws the error
> im=Image.new('RGB',(200,200),(100,100,100))
> d=ImageDraw.Draw(im)
> d.text((0,0),a)
> im.show()
> I have spent more than 3 dayes trying to figure it out. any help would be
> very appriciated
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
>
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig