Mailing List Archive

Manipulating images in Zope/Python
I am looking for strategy to programmatically create a customized
printable certificate of completion for our Learning Delivery System
courses (the system is Zope/Python based).

My current plan is to use the Python Imaging Library to create the
image (probably by overlaying some text on a stock image of a
completion certificate to create a new image). The final image will
then be emailed as an attachment to users.

Is this a reasonable approach? Any others that anybody can suggest?
Any samples of doing anything like this that anyone can point to?
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Manipulating images in Zope/Python [ In reply to ]
Am Montag, 24. Oktober 2011, 12:20:41 schrieb Brian Sullivan:
> My current plan is to use the Python Imaging Library to create the
> image (probably by overlaying some text on a stock image of a
> completion certificate to create a new image). The final image will
> then be emailed as an attachment to users.
>
> Is this a reasonable approach? Any others that anybody can suggest?
> Any samples of doing anything like this that anyone can point to?
hmmm,
this depends from how complex your graphic is and which graphical functions do
you need. For this job your PIL should be coming with freetype.

If you "just" want to place some rendered text on your bitmap graphic PIL
should be enough (yourimg.text()).

For more complex / difficult graphic works you may take looks at alternatives
like python/gimp, PyX (pdf/ps, LaTeX), sax (pdf) or others...


cheers,


Niels.

--
---
Niels Dettenbach
Syndicat IT&Internet
http://www.syndicat.com/
Re: Manipulating images in Zope/Python [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I would look into the options that Imagemagick or Graphicsmagick
give you for your problem. Calling the related binaries from Python
is unlikely the problem here.

- -aj

Brian Sullivan wrote:
> I am looking for strategy to programmatically create a customized
> printable certificate of completion for our Learning Delivery System
> courses (the system is Zope/Python based).
>
> My current plan is to use the Python Imaging Library to create the
> image (probably by overlaying some text on a stock image of a
> completion certificate to create a new image). The final image will
> then be emailed as an attachment to users.
>
> Is this a reasonable approach? Any others that anybody can suggest?
> Any samples of doing anything like this that anyone can point to?
> _______________________________________________ Zope maillist -
> Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No
> cross posts or HTML encoding! ** (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )

- --
ZOPYX Limited | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 Tübingen | Produce & Publish
www.zopyx.com | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJOpmtrAAoJEADcfz7u4AZjp48LwI8RRAligkvsS29rwlMtuXaS
81igvH9spYi6DaQrhzbe7be8ymUQyxPvK0yp6nFJQ2lopZEUac8ZAuzZ8sVqsGcS
IwoA86NskiIc7XntFmKOIgnwqZzmJSw/ex8K6KXBFf7dOJr1GuCio/7Ir6JU/FsC
9HaBw5nlFfAEUGwUt49RuuDAGlFDXKzDO8Qr4DA7PZpshHfBndaWgiTgMJLbdJT1
HKe3vM/YSNsKehz+C1LLP98Mh65ZsfsbBx7sey+4ZZWd/fEmCJ0oLR9Gx8mfomDK
UjlQp7AyO4VHC8yf+FEEV711ZIa5UJ/nT713zbhV7F/VilmfzaLcyRzYuOII9FiV
T/0BWW9XHW35Oi8UglCy5i553iThVCusR5SMKD7IOJaAxgB9BWqe7r7ipjg9QpgS
uyIHyjNcChXVqUup4UNBM+IowsSXBYT9PZCov1nzX6fvH94uHtKnX75ZTAYm4lEh
EgwJgw9CY9EFOJZjCdoD2TL8eGpQeGQ=
=EcBd
-----END PGP SIGNATURE-----