collective / plone.app.imagecropping

Crops Images in Plone manually using cropper JS library
https://pypi.python.org/pypi/plone.app.imagecropping
9 stars 23 forks source link

Add AspectRatio to Configuration #35

Closed agnogueira closed 10 years ago

agnogueira commented 10 years ago

One of the most importants options in Jcrop is the aspect ratio. That option alows you to define the width/height ratio.

Today the aspect ratio is fixed in 1: "aspectRatio": "1.00"

So all crop imagens will be a square.

We need to add a field in configuration to easily edit this ratio.

cartacapital

frisi commented 10 years ago

there might be a misunderstanding, the concept of plone.app.imagecropping is to operate on the scales given by plone.app.imaging.

if you need a 4:3 cropping area to satisfy your page design (eg for a teaser), you define new image scales in p.a.imaging accordingly.

so instead of thumb 128:128 and ratio 1.333333

you modify thumb or add a new scale teaserimage with these dimensions: 128:96

agnogueira commented 10 years ago

Ok, now the concept is clear for me. Thanks for your feedback.

But I think we have a problem here. Plone image sizes does not deal with ratio, is just size limits. And we are using this image max sizes values to do another thing.

Users will usually add a portrait or lanscape image, but the default cropped image will be a square. That doesnt makes much sense to me.

Maybe we can set the AspectRatio to 0 by default, so we doesnt have any limitation for the crop.

I will close this issue, but i think we need to think more about this default square cropped image.

frisi commented 10 years ago

for me the main use-case is clear:

feel free to add a ticket or reopen this one with a more detailed description of the usecase you need to support