PIL ImageFont getmask bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • michal bozon

    #1

    PIL ImageFont getmask bug?

    Hi,

    following code, which uses Pythin Imaging library 1.1.5,
    geenrates 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.

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

    I'm not sure, where the problem is.
    The result PPM file and magnified PNG file should be attached.

    --michal

Working...