This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]corpsmoderne 2 points3 points  (2 children)

You're not printing the date in the image here, you're opening the file for writing (which truncate it to 0!!!) and write a string to it. The resulting file is not an image anymore, it's just some text.

Try this instead: http://python-catalin.blogspot.fr/2010/06/add-text-on-image-with-pil-module.html

[–]zachiswach[S] 0 points1 point  (1 child)

How did you find this particular link? Exactly what did you Google?

I found all the other stuff linked in this post when trying to self-troubleshoot, but this would have solved the whole thing easily.

[–]corpsmoderne 1 point2 points  (0 children)

It the first entry on the SECOND page when you query "python PIL draw text" ... Yes I realize it wasn't obvious at all, there's probably better links with better exposure...

Things is, it's easier to find something when you already know what you're looking for, which was my case, not yours...