django-photoprocessor

Software Screenshot:
django-photoprocessor
Software Details:
Version: 0.1.7
Upload Date: 14 Apr 15
Developer: Jason Kraus
Distribution Type: Freeware
Downloads: 6

Rating: 5.0/5 (Total Votes: 1)

django-photoprocessor is a Django app that provides automated image processing for Django.

Step 1

pip install django-photoprocessor

(or clone the source and put the photoprocessor module on your path)

Step 2

Add ImageWithProcessorField to your models.

# myapp/models.py

from django.db import models
from photoprocessor.fields import ImageWithProcessorsField

thumbnails = {'thumbnail':{'resize':{'width':100, 'height':100, 'crop':'center'}, 'quality':90},
 'display': {'resize':{'width':500, 'height':500, 'crop':'center'}, 'quality':90}}

class Photo(models.Model):
 name = models.CharField(max_length=100)
 original_image = ImageWithProcessorsField(upload_to='books', thumbnails=thumbnails)


Step 3

Access your thumbnails

photo = Photo(name='myphoto')
photo.original_image.save('myfile.jpg', myfileobj)
print photo.original_image['thumbnail'].url

Requirements:

  • Python
  • Django

Other Software of Developer Jason Kraus

Comments to django-photoprocessor

Comments not found
Add Comment
Turn on images!