django-versatileimagefield icon indicating copy to clipboard operation
django-versatileimagefield copied to clipboard

Access to image field instance within sizer or filter class

Open pyzenberg opened this issue 8 years ago • 3 comments

Hi,

I need to add dynamic watermarks (eg: photographer name, copyright, url) into the cropped image. It's important to do it after image has been cropped because it should be scaled and uncut. Is there a way to access image field instance from process_image method?

Thanks

pyzenberg avatar Jul 20 '16 07:07 pyzenberg

Hey @pyzenberg –

Not at the moment but its definitely possible. Let me see if I understand correctly: is the goal to grab some data from the model instance associated with that image field so you can auto-generate watermarks on an image-by-image basis?

respondcreate avatar Jul 29 '16 20:07 respondcreate

Exactly! Though I made a little hack (#65) for my problem and it's working so far, but it would be great if you take a look on it as I'm not sure it's not a risk on performance or being unpythonnic.

Thanks

pyzenberg avatar Jul 29 '16 20:07 pyzenberg

Any progress about this PR? The option to access the image field inside the process_image method looks very attractive to me, also.

manikos avatar Jun 21 '17 16:06 manikos