jdriscoll/django-imagekit — Issue #65: Dynamically assign processors and etc.
Author: nishimu
Created: 2011-11-14 16:20:17+00:00
State: open

I want to assign the processors parameter for each instance.
For example, a ImageSpec is following;

display = ImageSpec([Adjust(contrast=1.2, sharpness=1.1),Transpose(Transpose.ROTATE_90),
resize.Fit(300, None)], image_field='original_image',
format='JPEG', quality=90,cache_to=my_cache_to)

and I want to change contrast, sharpness, and the Transpose method at runtime for each instance.

I found the similar request at #11 issue.
#11 expects more general way, but I don't have a good idea for #11

My idea is;
1) change "processors" of ImageSpec() to check callable or not, like "cache_to".
2) the callable "processors" gets parameters from instance of Model and generates processors array

Is it an effective change or not?