Created
July 15, 2013 14:30
-
-
Save blitline-dev/6000399 to your computer and use it in GitHub Desktop.
Complicated multi-step pre-processing
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
{ | |
"application_id": "YOUR_APP_ID", | |
"pre_process": [ | |
{ | |
"job": { | |
"pre_process": [ | |
{ | |
"job": { | |
"pre_process": [ | |
{ | |
"job": { | |
"src": "https://s3.amazonaws.com/bltemp/boys640.jpg", | |
"functions": [ | |
{ | |
"name": "composite", | |
"params": { | |
"gravity": "CenterGravity", | |
"src": "https://s3.amazonaws.com/img.blitline/samples/circle_crop_mask.png", | |
"composite_op": "CopyOpacityCompositeOp", | |
"as_mask": "true" | |
}, | |
"save": { | |
"image_identifier": "boys_with_crop" | |
} | |
} | |
] | |
} | |
} | |
], | |
"src": "&boys_with_crop", | |
"functions": [ | |
{ | |
"name": "resize_to_fill", | |
"params": { | |
"width": 400, | |
"height": 400 | |
}, | |
"save": { | |
"image_identifier": "resized_boys_with_crop" | |
} | |
} | |
] | |
} | |
} | |
], | |
"src": "&resized_boys_with_crop", | |
"functions": [ | |
{ | |
"name": "composite", | |
"params": { | |
"src": "https://s3.amazonaws.com/bltemp/maske.png", | |
"gravity": "CenterGravity" | |
}, | |
"save": { | |
"extension": ".png", | |
"image_identifier": "maske_resized_boys_with_crop", | |
"png_quantize": true | |
} | |
} | |
] | |
} | |
} | |
], | |
"src": "&maske_resized_boys_with_crop", | |
"functions": [ | |
{ | |
"name": "resize_to_fit", | |
"params": { | |
"width": 100 | |
}, | |
"save": { | |
"image_identifier": "MY_CLIENT_ID" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment