Open Source Python API for Images
On-demand crop, re-sizing and flipping of images
Thumbor is an open source Python API to crop, re-size and flip images. You can access the feature of the API, thumbor offer endpoint to retrive image and image's metadata. Using the API, you can remove the space around the images using the trim functionality, you can add munual corpping functionality is your application using the manual crop feature or you can just fit in the image exactly the size specified.
Furthermore, using the API you can use filters, extract metadata, specify the size of the output image, align image horizontaly and vertically using the API endpoints.
At A Glance
An overview of Thumbor features.
- Resize Image
- Flip Image
- Add Filters
- Manual Crop
- Fit In
- Horizontal Align
- Vertical Align
- Smart Cropping
- Extract Metadata
Thumbor supports popular Image file formats listed below.
Thumbor v7.0.0 and later only supports python 3.7+
Getting Started with Thumbor
The recommended way to install thumbor is via Pip. Please use the following command to install thumbor.
pip install thumbor
Manual Cropping in Images via Free Python API
Using Thumbor API you can the functionality of cropping images manually in your own applications. In order to perform manula cropping, you need to pass two points as arguments seperated by a colon. where the first point is the left-top point of the cropping rectangle and the second point is the right-bottom point. This crop is performed before the rest of the operations, so it can be used as a prepare step before resizing and smart-cropping
Horizontal and Vertical Image Alignment - Python
The Open Source image library thumbor allows aligning images horizontaly and vertically. The horizotal align image controls wher the crop of the image will occur. You can use three parametes for the horizotal align feature. Left only the left side, center will trim equally from both side, and the right will only trim form the right. Similarly, while using verticle alignment, top only trims the bottom, center will trim from both top and bottom, and bottom align will trim the image from the top.
Add Filters in Images via Free Python API
Thumbor allows pyhton developers to add filters in images programatically. The API runs the filters in in a pipline and each filter is applied on the image in a spcified order. The API provies wide range of filters including, AutoJPG, Background Color, Blur, Brightness, Contrast, Convolution, Equalize, Extract focal points, Filling, Focal, Format, Grayscale, Maxbytes, No upscale, Noise, Proportion, Quality, Red eye, RGB, Rotate, Round Corners, Sharpen, Stretch, Strip EXIF, Strip ICC, and watermark.