Weβre beyond excited to unveil the brand-new PixLab AI Photo Editor β a revolutionary browser-based tool that allows you to edit photos using simple text prompts, powered by the latest in generative AI.
Whether you're a designer, content creator, marketer, or just someone who wants stunning visuals fast, the PixLab AI Photo Editor brings you powerful features that feel like magic.
Imagine telling your editor what you want in plain language:
"Remove the object and replace it with a beach."
"Fix the lighting and make it look like sunset."
"Remove the person in the background."
"Turn this photo into a painting."
With PixLabβs new AI Photo Editor, you simply type your command, and the editor does the rest. No layers. No complicated sliders. Just your words.
π οΈ A Complete AI Editing Suite in Your Browser
Hereβs whatβs packed into this groundbreaking release:
β¨ Generative Fill
Remove or replace anything in your image with smart content-aware AI.
Fix broken or missing areas with stunning realism.
π§Ό Magic Erase & Cleanup
Instantly remove objects, text, blemishes, or distractions from any photo.
πͺ AI Style Transfer
Transform your images with artistic styles β Van Gogh, cyberpunk, comic book, and more β with one click.
π Precision Cut-Outs & Background Replacement
Remove or swap backgrounds with unmatched precision.
Place your subject anywhere: a studio backdrop, a forest, outer space β you name it.
πΌοΈ Intelligent Upscaling
Sharpen and enlarge images without losing detail using AI-powered super-resolution.
π Relight with AI
Simulate professional lighting effects. Make it golden hour or add shadows β all without touching a light.
π Smart Resizer
Resize and crop for any format (Instagram, LinkedIn, YouTube, etc.) with intelligent frame optimization.
π€ Share & Collaborate
Export in high-res, or share your creations across devices via cloud sync and secure sharing.
β‘ Who Is It For?
This editor is designed for everyone:
- Marketers & creatives making ad visuals or social posts
- Photographers looking for fast AI retouching
- E-commerce teams producing polished product shots
- Casual users who just want great images with zero hassle
π No Installs. No Signups. No Uploads.
PixLab AI Photo Editor works entirely in your browser:
- All edits are done client-side
- Your data stays private
- No software to install
- No account required
Just open, drop in your photo, and start creating.
π Ready to Try the Future of Photo Editing?
This is the most powerful release from PixLab to date, combining cutting-edge generative AI with an intuitive interface that anyone can use.
Let us know what you create β and stay tuned for even more features like multi-image workflows, batch editing, and direct integration with the PixLab Vision Platform!
Welcome to the new era of image editing. ποΈβ¨
MEMEs are de facto internet standard nowadays. At least, dozen if not hundred of daily top posts on Imgur or Reddit are probably MEMEs. That is, a pop culture image with sarcastic text (always) displayed on Top, Bottom or Center of that image. A lot of web tools out there let you create memes graphically but a few ones actually propose an API for generating memes from your favorite programming language.
In this blog post, we'll try to generate a few MEMEs programmatically using Python, PHP or whatever language that support HTTP requests with the help of the PixLab API but before that, lets dive a little bit into the tools needed to build a MEME generator.
Crafting a MEME API
Building a RESTful API capable of generating memes at request is not that difficult. The most important part is to find a good image processing library that support the annotate operation (i.e. Text drawing). The most capable & open source libraries are the ImageMagick suite and its popular fork GraphicsMagick. Both provides advanced annotate & draw capability such as selecting the target font, its size, text position, the stroke width & height and beyond. Both should be a good fit and up to the task. Here is some good tutorials to follow if you wanna build your own RESTful API:
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.
So, without further ado, let's start programming some memes..
Draw some funny text on top & bottom of that image to obtain something like this:
Using the following code:
import requests
import json
# Draw some funny text on top & button of the famous Cool Cat, pubic domain image.
# https://pixlab.io/cmd?id=drawtext is the target command
req = requests.get('https://api.pixlab.io/drawtext',params={
'img': 'https://pixlab.io/images/jdr.jpg',
'top': 'someone bumps the table',
'bottom':'right before you win',
'cap':True, # Capitalize text,
'strokecolor': 'black',
'key':'Pix_Key',
})
reply = req.json()
if reply['status'] != 200:
print (reply['error'])
else:
print ("Meme: "+ reply['link'])
/*
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github
* https://github.com/symisc/pixlab-php
*/
require_once "pixlab.php";
# Draw some funny text on top & button of the famous Cool cat, public domain photo
# https://pixlab.io/cmd?id=drawtext is the target command
/* Target image */
$img = 'https://pixlab.io/images/jdr.jpg';
# Your PixLab key
$key = 'My_Pix_Key';
/* Process */
$pix = new Pixlab($key);
if( !$pix->get('drawtext',array(
'img' => $img,
'top' => 'someone bumps the table',
'bottom' => 'right before you win',
'cap' => true, # Capitalize text,
'strokecolor' => 'black'
)) ){
echo $pix->get_error_message()."n";
die;
}
echo "Pic Link: ".$pix->json->link."n";
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.
Only one command (API endpoint) is actually needed in order to generate such a meme:
drawtext is the API endpoint used for text annotation. 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. You can find out all the options the drawtext command takes here.
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. Here is an usage example.
Dynamic MEME
This example is similar to the previous one except that the image we'll draw something on top is generated dynamically. That is, we will request from the PixLab API server to create a new image for us with a specified height, width, background color and output format and finally we'll draw our text at the center of the generated image to obtain something like this:
Using this code:
import requests
import json
# Dynamically create a 300x300 PNG image with a yellow background and draw some text on the center of it later.
# Refer to https://pixlab.io/cmd?id=newimage && https://pixlab.io/cmd?id=drawtext for additional information.
req = requests.get('https://api.pixlab.io/newimage',params={
'key':'My_Pix_Key',
"width":300,
"height":300,
"color":"yellow"
})
reply = req.json()
if reply['status'] != 200:
print (reply['error'])
exit();
# Link to the new image
img = reply['link'];
# Draw some text now on the new image
req = requests.get('https://api.pixlab.io/drawtext',params={
'img':img, #The newly created image
'key':'My_Pix_Key',
"cap":True, #Uppercase
"color":"black", #Text color
"font":"wolf",
"center":"bonjour"
})
reply = req.json()
if reply['status'] != 200:
print (reply['error'])
else:
print ("Pic location: "+ reply['link'])
/*
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github
* https://github.com/symisc/pixlab-php
*/
require_once "pixlab.php";
# Dynamically create a 300x300 PNG image with a yellow background and draw some text on top of it later.
# Refer to https://pixlab.io/cmd?id=newimage && https://pixlab.io/cmd?id=drawtext for additional information.
# Your PixLab key
$key = 'My_Pix_Key';
/* Process */
$pix = new Pixlab($key);
echo "Creating new 300x300 PNG image...n";
/* Create the image first */
if( !$pix->get('newimage',[
"width" => 300,
"height" => 300,
"color" => "yellow"
]) ){
echo $pix->get_error_message()."n";
die;
}
# Link to the new image
$img = $pix->json->link;
echo "Drawing some text now...n";
if( !$pix->get('drawtext',[
'img' => $img, #The newly created image
"cap" => True, #Uppercase
"color" => "black", #Text color
"font" => "wolf",
"center" => "bonjour"
]) ){
echo $pix->get_error_message()."n";
die;
}
echo "New Pic Link: ".$pix->json->link."n";
Here, we request a new image using the newimage API endpoint which export to PNG by default but you can change the output format at request. We set the image height, width and the background color respectively to 300x300 with a yellow background color.
Note that if one of the height or width parameter is missing (but not both), then the available length is applied to the missing side and if you want a transparent image, set the color parameter to none.
We finally draw our text at the center of the newly created image using the wolf font, black color and 35 px font size. Of course, one could draw lines, a rectangle for example to surround faces, merge with other images and so forth...
Mimic Snapchat Filters
This last example, although relatively unrelated to our subject here is about to show how to mimic the famous Snapchat filters programmatically. So, given an input image:
and this eye mask:
output something like this:
Well, in order to achieve that effect except for the MEME we draw on the bottom of that image, lots of computer vision algorithms are involved here such as face detection, facial landmarks extraction, pose estimation and so on. You are invited to take a look at our previous blog post on how such filter is produced, what techniques are involved and so on: Mimic Snapchat Filters Programmatically.
Conclusion
Generating MEMEs is quite easy providing a good image manipulation library. We saw that ImageMagick and GraphicsMagick with their PHP/Node.js binding can be used to create your own MEME Restful API.
Our simple yet elegant solution is to rely on the PixLab API. Not only generating MEMEs is straightforward but also, you'll be able to perform advanced analysis & processing operations on your input media such as face analysis, nsfw content detection and so forth. Your are invited to take a look at the Github sample page for dozen of the others interesting samples in action such as censoring images based on their nsfw score, blurring human faces, making gifs, etc. All of them are documented on the PixLab API endpoints reference doc and the 5 minutes intro the the API.
Finally, if you have any suggestion or critics, please leave a comment below.