dffrntmedia / thumbor

thumbor is an open-source photo thumbnail service by globo.com

Home Page:http://thumbor.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Survey

If you use thumbor, please take 1 minute and answer this survey? It's only 2 questions and one is multiple choice!!!

Coverage Status Code Climate Codacy Badge Issue Stats Issue Stats PyPI PyPI Bountysource

thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images.

It also features a VERY smart detection of important points in the image for better cropping and resizing, using state-of-the-art face and feature detection algorithms (more on that in Detection Algorithms).

Using thumbor is very easy (after it is running). All you have to do is access it using an URL for an image, like this:

http://<thumbor-server>/300x200/smart/s.glbimg.com/et/bb/f/original/2011/03/24/VN0JiwzmOw0b0lg.jpg

That URL would show an image of the big brother brasil participants in 300x200 using smart crop.

There are several other options to the image URL configuration. You can check them in the Usage page.

For more information check thumbor's documentation.

Demo

You can see thumbor in action at http://thumborize.me/

Join the chat at https://gitter.im/thumbor/thumbor

dffrntlab part

Where it is

https://pypi.org/project/dffrntlab-thumbor/

Push to PyPi

python setup.py sdist bdist_wheel
# install twine if you don't have
# pip install twine
twine upload dist/*

Now we use this profile to push packages: https://pypi.org/user/maximka777/ (need to register dffrntlab one).

How to run locally

At first we need to install all dependencies via make setup.

Run via:

pip install .
# or `pip2 install .` when we have to ask use of Python 2 pip explicitly
make run-with-config

When you changed something in project you need to reinstall application via pip install .

In this configuration ./thumbor/thumbor.conf file you can specify detector in DETECTORS (e.g.: primary color detector -> 'thumbor.detectors.primary_color_detector').

Also we can run Thumbor via (without reinstalling): make.

Filter out external requests

To filter out external requests Thumbor check Host header if it ends with top level domain. List of TLDs you can specify in TOP_LEVEL_DOMAINS configuration field (by default it is ['com']). This check is applied only for POST /image endpoint.

About

thumbor is an open-source photo thumbnail service by globo.com

http://thumbor.org

License:MIT License


Languages

Language:Python 89.3%Language:C 9.1%Language:Makefile 1.6%Language:JavaScript 0.1%