To use imgble, you need to prefix your images with
http://api.imgble.com/
So your HTML image tag becomes like this
<img src="http://api.imgble.com/http://mydomain.com/myimage.jpg" alt="my image" />
imgble will automatically detect the mobile device’s resolution and resize the image accordingly.
Specifying the width and height
If you want to bypass the automatic detection, and want to specify the dimensions, simply add the width and the height at the end of the URL, like that
http://api.imgble.com/http://mydomain.com/myimage.jpg/200/300
The above URL will output the image with width at 200px and the height at 300px, ignoring the aspect ratio.
If you want to keep the aspect ratio, you supply only the width or only the height. For the width:
http://api.imgble.com/http://mydomain.com/myimage.jpg/200
And for the height, you need to specify the width to zero, like that:
http://api.imgble.com/http://mydomain.com/myimage.jpg/0/300
Output format
Choosing the output format too is possible. The supported output formats are jpeg(default), png and gif. For example:
http://api.imgble.com/http://mydomain.com/myimage.jpg/png
will output the resulting image in png format.
You can mix the output format with the width and height explained above like that:
http://api.imgble.com/http://mydomain.com/myimage.jpg/200/300/png
Effects
There are over 20 effects you can apply on the fly on your images. More info on the effects documentation page.
Trackbacks