easy-images

Easy Images

Easy images for Django.

Processes a source image via a dictionary of options. For example, the following dictionary would resize the source image down and crop it to output a 64x64 image::

{'crop': (64, 64)}

Usage with Aliases

To make it easier to manage the different option dictionaries, it is recommended to define aliases that you can use to centralize all the image generation options in a single place.

In your settings::

EASY_IMAGES = {
    'ALIASES': {
        'smallbox': {'crop': (32, 32), 'upscale': True},
    },
}

Then to generate thumbs in a Django template just use::

<img src="{% image person.avatar alias 'smallbox' %}" alt="">

Or in Python, use::

from easy_images.aliases import aliases
from easy_images.images import EasyImage
EasyImage('some/file', aliases.get('smallbox')).generate()

See docs for details.

Related Repositories

pinry

pinry

The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format. ...

php-gif

php-gif

Easy generating (real-time) GIF images with PHP ...

EGOImageLoading

EGOImageLoading

What if images on the iPhone were as easy as HTML? ...

go.rice

go.rice

go.rice is a Go package that makes working with resources such as html,js,css,images,templates, etc very easy. ...

Android-Ultra-Photo-Selector

Android-Ultra-Photo-Selector

Select images from Android devices made easy :-) Start Activity PhotoSelectorActivity, this is the main entry point ...