This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Dynamically create a 300x300 PNG image with a yellow background and draw some text at 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':'PIXLAB_API_KEY', # Your PixLab API Key - Get yours from https://pixlab.io/dashboard | |
"width":300, | |
"height":300, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Composite a static image on top of a GIF. | |
# If you want to composite multiple images, then use the `merge` command instead. | |
import requests | |
import json | |
# https://pixlab.io/cmd?id=gifcomposite | |
gif = 'http://i.stack.imgur.com/h8Hjm.gif' | |
# Static images to be displayed starting from frame 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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"; | |
# Composite a static image on top of a GIF. | |
# If you want to composite multiple images, then use the `merge` command instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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"; | |
# Detect all human faces present in a given image and try to guess their age, gender and emotion state via their facial shapes. | |
# https://pixlab.io/#/cmd?id=facemotion for more info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Detect all human faces present in a given image and try to guess their age, gender and emotion state via their facial shapes | |
# Target image: Feel free to change to whatever image holding as many human faces as you want | |
img = 'http://www.scienceforums.com/uploads/1282315190/gallery_1625_35_9165.jpg' | |
req = requests.get('http://api.pixlab.io/facemotion',params={ | |
'img': img, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Upload a local image to the remote https://pixlab.xyz storage server or your own S3 bucket depending on the configuration from your dashboard. | |
# Use the output link for other purposes such as processing via mogrify, drawrectangles, etc. or simply serving content. | |
# https://pixlab.io/#/cmd?id=store for more info. | |
req = requests.post('http://api.pixlab.io/store', # Switch to http:// for fast upload | |
files = {'file': open('./local_image.png', 'rb')}, | |
data={ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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"; | |
# Upload a local image to the remote https://pixlab.xyz storage server or your own S3 bucket depending on the configuration on the PixLab dashboard. | |
# Use the output link for other purposes such as processing via mogrify, drawrectangles, etc. or simply serving content. | |
# https://pixlab.io/cmd?id=store for more info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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"; | |
# Find a person's face in a crowd or group of people. https://pixlab.io/cmd?id=facelookup for additional information. | |
# This is the target face that we are searching for in the people crowd. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# Find a person's face in a crowd or group of people. https://pixlab.io/cmd?id=facelookup for additional information. | |
# This is the target face we are looking for. | |
face = 'http://static-secure.guim.co.uk/sys-images/Guardian/Pix/pictures/2012/7/9/1341860104423/obama_face.jpg' | |
# The people crowd to look on | |
crowd = 'http://www.acclaimimages.com/_gallery/_free_images/0519-0908-1001-0556_president_barack_obama_walking_with_a_crowd_of_people_o.jpg' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 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"; | |
# Detect all human faces & extract their landmark regions via facelandmarks & make a small Snapchat filter effect. | |
# Only three commands are actually needed in order to mimic the Snapchat filters effects: | |
# face landmarks: https://pixlab.io/cmd?id=facelandmarks |