jonom / jquery-focuspoint

jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.
Other
3.15k stars 211 forks source link

Specify ideal cropping region #41

Open jcdsr opened 9 years ago

jcdsr commented 9 years ago

Hi,

I'm wondering if is possible to create a close up image.

Imaging on the kangaroo demo, on the small frame to zoom in the kangaroo to create like a close up. Meaning the natural size of that image wont change, what change is the position on the picture on a small size.

On those demos you have, the with of the image resize as well as the frame. I would like to keep the image as big possible and then select the focuspoint.

A css option will be amazing.

Please find image attached for a better understanding.

kangaroo

jonom commented 9 years ago

Hi @carlosdv4, I don't think this would be possible with only CSS but could be added to the script with a downscale=true|false config setting. It will require editing the layout algorithm quite a bit which I don't have time to do right now but you're welcome to submit a PR if you solve the problem. Otherwise I'll explore this option down the road and look at adding it in a future update.

jonom commented 8 years ago

I wrote a brief for a feature that could solve this problem. The idea is that you specify how you would ideally like your image to be cropped, and the space around it is only shown when necessary. I would like to develop this feature but can't justify it at the moment, will keep it here in case anyone wants to sponsor development.

ideal crop

jcdsr commented 8 years ago

That's was exactly what I was looking for that time. I hope someone sponsor this great feature.

jonom commented 5 years ago

For anyone looking for this functionality - this has been available in the v-2-dev branch for a couple of years. https://github.com/jonom/jquery-focuspoint/tree/v-2-dev#minimum-cropping-region