Why not using imageMagick? It's quite easy to do and doesn't require lots of code. Basic patch attached.
Why not using imageMagick? It's quite easy to do and doesn't require lots of code.
Basic patch attached.