Gencards generates svg files of playing cards in all four suits -- hearts clubs diamonds spades. You can then use other tools to convert these svg cards to pngs or whatever you like.
Feel free to use the script or resultant svg files however you like -- the code and generated cards are covered under the Apache license.
If you do use the script, please go ahead and watch the github project as payment :)