[Image-SIG] Changing text direction with draw.text()

Laura & Edward Cannon cannon.el at gmail.com
Thu Aug 21 03:45:04 CEST 2008


you could either make the text horizontal and rotate it using
im.rotate or if that is not what you want you could get something like
T
H
I
S
by looping through the string and drawing each letter separately. something like
x = 100
y=100
for c in "your text here":
  d.draw((x,y), c ...) #d is a draw instance
  y = y + 20

2008/8/19 ersen kavak <ersenkavak at gmail.com>:
> Dear all;
> I am a new Python user. I am enjoying the imaging capabilities of python
> currently.
> I am using PIL module. However, in spite of my long searches over forums,
> books and the internet I could not manage to print a text in vertical
> direction onto an image.
> I am guessing that this should be possible, but...
> Any suggestions are very wellcome ?
>
> Best Regards
>
> --
> Ersen Kavak
> Karolinska Universitetssjukhuset Solna
> CCK, R8:05
> 171 76 Stockholm
> Lab: +46851770585
> Mobile: +46707875729
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>


More information about the Image-SIG mailing list