Django-imagekit: how to reduce image quality with a preprocessor_spec ?
Posted
by pierre-guillaume-degans
on Stack Overflow
See other posts from Stack Overflow
or by pierre-guillaume-degans
Published on 2009-09-22T14:09:07Z
Indexed on
2010/05/14
11:04 UTC
Read the original article
Hit count: 355
Hi, please excuse me for my ugly english :p
I've created this simple model class, with a Preprocessor to reduce my photos'quality (the photos'extension is .JPG):
from django.db import models
from imagekit.models import ImageModel
from imagekit.specs import ImageSpec
from imagekit import processors
class Preprocessor(ImageSpec):
quality = 50
processors = [processors.Format]
class Picture(ImageModel):
image = models.ImageField(upload_to='pictures')
class IKOptions:
preprocessor_spec = Preprocessor
The problem : pictures'quality are not reduced. :( Any idea to fix it ?
Thank you very much ;)
© Stack Overflow or respective owner