There is a more flexible command named drawtextat that let you draw text on any desired region of the input image by specifying the target coordinates (X,Y) of where the text should be displayed. You can find out all the options the drawtext command takes here. It expect the text to be displayed on Top, Center or Bottom of the target image and support a bunch of other options such as selecting the text font, its size & colors, whether to capitalize the text or not, stroke width & opacity and so on. Only one command (API endpoint) is actually needed in order to generate such a meme:ĭrawtext is the API endpoint used for text annotation. If this is the first time you've seen the PixLab API in action, your are invited to take a look at the excellent introduction to the API in 5 minutes or less. py/ php snippet available on the PixLab Github Repository. # Draw some funny text on top & button of the famous Cool cat, public domain photo * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github ![]() Given an input image of the famous Cool Cat, public domain photo:ĭraw some funny text on top & bottom of that image to obtain something like this: So, without further ado, let's start programming some memes. In our case, we'll stick with the PixLab API due to the fact that is shipped with robust API endpoints such as Image compositing, facial landmarks extraction, dynamic image creation that proves of great help when working with complex stuff such as cloning Snapchat filters or playing with GIFs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |