APIholdit is a drop-in and easy to deploy microservice who exposes an HTTP API you can use to generate placeholder images with a desired text, automatically centered and scaled.
For example:
The main entry point for the REST API is the following URL:
http://<host>:<port>/i
This URL accept the following parameters:
width
of the placeholder image in pixels.
By default is
640
pixels.
height
of the placeholder image in pixels.
By default is
480
pixels.
text
defines the placeholder text that will appear autoscaled and centered on the placeholdwr image.
This text should be encoded to allow special characters.
By default is the string
Placeholder
.
bgcolor
sets the background color to be used to render the placeholder image.
By default is the color called Silver from the FlatUIColors color palette. And its code is
#bdc3c7
.
fgcolor
sets the foreground color, or the color being used to draw the text on the placeholder image.
By default is the color called Midnight Blue from the FlatUIColors color palette. And its code is
#2c3e50
.
Here are a few eamples using the previous defined API:
You can also deploy APIHoldit on Heroku with this one click button:
(The MIT License)
Copyright (c) 2017 apiholdit Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.