Let's say I have a javascript crop image style with the width & height set to 200 x 200 and aspect ratio set to CROP. I upload an image, and then go to crop it in the popup. So far, so good, but there is an option for 212 X 118. That 118 dimension is smaller than the crop selection area ("toolbox"). If I set the dropdown to 212 X 118, toolbox gets squashed to 200 x 118, even though I have the toolbox configured to not be resizable. The toolbox will not then recover its shape if I set the "scale image" dropdown back to a larger dimension set. The only way to fix it is to cancel out of the popup and then open the popup again. That's easy for my editors to do, but in a community site that's open to the public, I need for that "scale image" dropdown to omit any dimension sets smaller than the toolbox, so the toolbox won't have one or both of its dimensions distorted if someone happens to set the "scale image" dropdown to a smaller dimension.

The dropdown could either respect the minimum dimensions set in the field itself, or it could respect the dimensions set in the image style. That is, it could omit options that have a dimension smaller than the field's minimum or smaller than the toolbox. Or the toolbox could be made to recover its shape in the event that we choose a dimension set larger than the toolbox after choosing a dimension set smaller than the toolbox.

The dimensions in my example above are not real. I don't know whether I would actually be presented with a 212 x 118 option if the crop area were 200 x 200. But there are definitely sometimes options presented that have at least one of the two dimensions smaller than the corresponding dimension (width or height) for the toolbox.

Thank you

Comments

gooddesignusa’s picture

I have verified this issue. I was able to reproduce it today. I'm trying to fix the scale option so height and width would respect crop sizes. Right now its just respecting the width. I'm not sure if this was by design or what. I think in d6 it did the same thing but imagecache would render black since it would try to crop part of the image that is off the canvas.

nils.destoop’s picture

Status: Active » Fixed

This should be fixed. A patch can be found at http://drupalcode.org/project/imagecrop.git/patch/2525373

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.