29
6
I like making dank memes out of my own images. But all those so called "quick meme" sites just have too much code. I realized that the only way to make the dankest meme generator is to ask you guys at PPCG to golf one for me. So let me give you the low down on what you have to do.
Specs
- Take an image as input as a file name, image object, etc. to make a meme out of.
- Then take two strings for top text and bottom text (with no line breaks).
- Render the text on the image in size 22pt Impact white font with 5px black outline (You can assume Impact is installed.
- The text should be centered horizontally.
- You can assume the text fits horizontally.
- The respective texts should be 10px from the top and 8px from the bottom.
- Then output the image by saving in a file, displaying, etc.
- This is code-golf, so shortest code in bytes wins!
Happy Memeing!
1Can we assume the Impact font is installed? – Downgoat – 2016-02-07T20:10:14.877
@Downgoat yeah. – Maltysen – 2016-02-07T21:50:08.957
9...advice animals? Is this what you call a dank meme? – nine – 2016-02-08T06:38:36.313
5These memes aren't dank at all. This is like, entry-level memeology. – Pyritie – 2016-02-08T11:09:35.730
2@Pyritie Not everyone should be allowed to wield meme magic just yet. – hownowbrowncow – 2016-02-08T14:26:58.013
Can we assume we have impact font including the black border installed? – Eumel – 2016-02-08T15:43:26.957