ic-labs / django-icekit

GLAMkit is a next-generation Python CMS by the Interaction Consortium, designed especially for the cultural sector.
http://glamkit.com
MIT License
47 stars 11 forks source link

IIIF cropping is broken or counterintuitive. #209

Closed cogat closed 7 years ago

cogat commented 7 years ago

I couldn't get the region selection /iiif/1861/100,150,50,60/50,/0/default.png format to behave as expected. It seems to resize and use the crop region width/height ratio, but not crop from anywhere except the top left and to the full width of the image.

cogat commented 7 years ago

From James on #204:

@cogat There might be some muddling between the region cropping and size scaling, since currently that all happens in a single image-processing pass. That simple approach is likely too simple, though your description of what is happening matches my understanding of the spec.

jmurty commented 7 years ago

Reading this again, the bug is probably the way I'm using the crop option to the thumbnailer, which only specifies x,y offsets not width,height dimensions. Including the dimensions might require a custom processor for easy-thumbnails, or I've missed something simple.

Here's what the spec says regarding the ordering of image manipulations: http://iiif.io/api/image/2.1/#order-of-implementation