matiasgali / guillotine

jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
http://guillotine.js.org
326 stars 100 forks source link

Need a way to allow the user to zoom out so that the entire original image fits in the crop area #43

Closed bradmurray closed 8 years ago

bradmurray commented 8 years ago

Sometimes when cropping an image to fit an aspect ratio you need to pad one side to get all of the image in the cropped area. With guillotine the most you can zoom out is to where the image is still filling the desired crop area. If there were a mode where you could zoom out more it would be more useful for some circumstances. For example you want to print a square picture on and 8x10 piece of paper and you are willing to either have white space on or cut the final product. The important thing is that you are able to print the comple image.

matiasgali commented 8 years ago

Hi @bradmurray, it would be useful in some circumstances but I think it is out of the scope of the plugin.

The idea is to to produce a filled image of certain dimensions. The user is forced to select an area without blank spaces so that you can be sure you can crop the original and get an image of the dimensions you need.

Loosening that restriction is opening the door for people to start asking about no zoom restrictions and so on for even more use cases. There are already more complex and multi-purpose plugins out there that allow to work that out so I think it is best to keep it simple, lightweight and make the plugin do one thing and do it well.

I hope you understand.