[Image-SIG] ImageFont getmask() bug?

michal bozon Michal.Bozon at vscht.cz
Mon May 15 18:54:25 CEST 2006


Hi,

following code, which uses PIL 1.1.5,
generates a bitmap of text "of" rendered in Georgia font,
but the result is strange, it seems like the rightmost
pixel column is shifted to the left,
it belongs to the "f" letter.

import ImageFont
fp = '/usr/share/fonts/corefonts/'
font = ImageFont.truetype(fp+'georgia.ttf', 10)
m = font.getmask('of', mode='1')
m.save_ppm('of.ppm')

The result PPM file and magnified PNG file should be attached.

--michal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: of.png
Type: image/png
Size: 139 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20060515/584fc6eb/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: of.ppm
Type: image/x-portable-pixmap
Size: 111 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20060515/584fc6eb/attachment.ppm 


More information about the Image-SIG mailing list