473,396 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.truetype(fp+'georgia.ttf', 10)
m = font.getmask('of', 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

May 10 '06 #1
0 1241

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jean-Baptiste Cazier | last post by:
Sæl ! I am trying to rotate some text and paste it into a larger PIL Image. ( cannot use PyFT for some reasons) However I have a problem of transparency and my new images in a box shape are...
4
by: Doug R | last post by:
I'm trying to create an anti-automation feature to prevent scripts from running reports on our website by requiring users to enter a code from an image (like Yahoo e-mail sign-up, or Network...
10
by: Stéphane Ninin | last post by:
Hello all, I am writing (on Linux Redhat 9) some script to make graphs using PIL, from a set of points. All is ok, except that there seems to be no font coming with PIL. Where could I fond...
3
by: Steve Holden | last post by:
If nobody has a quick answer I'll go to the PIL list, but I'm having problems with PIL JPEG support on Windows, and figured someone on c.l.py might have solved this problem. I built the Cygwin...
11
by: Samantha | last post by:
I am attempting to extract the Font Names from the installed windows fonts. I am having a heck of a time getting these rather than the file names. Examples can be seen by going to Control Panel >...
0
by: sector119 | last post by:
I use python 2.4.1 and PIL 1.1.5 and when I execute my program I got error: ../code.py Traceback (most recent call last): File "./code.py", line 7, in ? class DrawPlus(ImageDraw.Draw):...
4
by: Stefano Masini | last post by:
Hi, I have a simple need, running under windows: 1) retrieve the list of installed system fonts 2) maybe install missing fonts Surprisingly for me, there seems to be no support for such a...
5
by: Christian Stapfer | last post by:
After switching from Python 2.3 to 2.4 (Enought), PIL throws an exception that did not occur formerly (under Python 2.3) when executing ImageFont.truetype(font, size) where font =...
6
by: T00l | last post by:
Hi I have the following script that counts the amount of words in a file, prints an output, closes the file and then waits for 10secs. I need the script to repeat itself after it was waited the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.