-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crop images without resizing #9499
Comments
Yes, we should probably add this, but in what situations would you use this and not |
My use case is that I have several hundred very large detailed images (generative art) and I wanted to create smaller thumbnail / summary images that just showed a part of the image but without resizing so none of the detail is lost. |
@johnsvenn OK, a pull request would be welcomed. Just put new documentation in the /docs folder of this repo. |
Thanks @bep Will do. |
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation. Fixes gohugoio#9499
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation. Fixes #9499
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
At the moment Hugo has image processing methods for
Fit
,Fill
,Resize
, andFilter
. I think it would be very useful to have the ability toCrop
an image without resizing (using the disintegration/giftCropToSize
method). This would useAnchor
in exactly the same way as the existingFill
method to position the crop.I've already implemented this locally and if anybody else would find this useful I will add tests, update the docs and submit a PR.
The text was updated successfully, but these errors were encountered: