[Image-SIG] Creating text on images
Morten W. Petersen
morten at nidelven-it.no
Tue Feb 15 16:55:19 CET 2005
Dmitry,
great, exactly what I needed again. :)
-Morten
Dmitry Vasiliev wrote:
> Morten W. Petersen wrote:
>
> [SKIP]
>
>> Thanks, as I mentioned earlier, that helped. I have a new problem
>> now however;
>> the image I'm drawing on is a transparent PNG, and any text that's
>> drawn is
>> also transparent, i.e. it just 'cuts out' pieces of the image instead
>> of drawing colored text.. how do I fix that?
>
>
> The slightly modified example:
>
> >>> image = Image.new("RGBA", (100, 50))
> >>> draw = ImageDraw.Draw(image)
> >>> draw.text((12, 12), "Hello, World!", fill=(0, 0, 0, 0x55))
> >>> draw.text((10, 10), "Hello, World!", fill=(0, 0, 0xff, 0xff))
> >>> image.save("test.png")
>
--
Regards,
Morten
Tlf: +47 45 44 00 69
Blog: http://www.blogologue.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: morten.vcf
Type: text/x-vcard
Size: 290 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20050215/81e27183/morten.vcf
More information about the Image-SIG
mailing list