piasek 0 Newbie Poster


Hello

I would like get this effect using PIL:
http://www.echostar.pl/~piasekps/10.png

i have this code but it is not what i want, can you help me somehow?
i will be greatfull for any help
best regards
p.s.

i have also problem with ImageFont.truetype(font_ttf, size)
it does not work on linux, when i put font_ttf = "ARIAL.TTF "
or "/windows/Windows/Font/ARIAL.TTF"

import Image, ImageFont, ImageDraw, ImageFilter, ImageChops

txt = "11"
font = ImageFont.truetype("ARIAL.TTF", 65)
x,y = font.getsize(txt)

img = Image.new("RGBA", (x,y))
draw = ImageDraw.Draw(img)
draw.text((0,0),txt, font = font, fill = "rgb(255,255,255)")

(r,g,b,a) = img.split()
shadow = Image.merge("RGBA", (a,a,a,a))
shadow=shadow.filter(ImageFilter.BLUR)
bck = img.size
bck = Image.new("RGBA", bck, (0,0,0,0))
bck = ImageChops.multiply(shadow, bck)
bck = ImageChops.offset(bck, -1, -1)
final = Image.composite(img, bck, a)
final.save("c:\\11.png", "PNG")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.