-
Notifications
You must be signed in to change notification settings - Fork 202
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
Use cover
method from Intervention
#419
base: 3.x
Are you sure you want to change the base?
Conversation
cover
method from Intervention
cover
method from Interventioncover
method from Intervention
cover
method from Interventioncover
method from Intervention
@ADmad I've been using this update with a project already, the documentation for |
Sounds good to me, would you like to take care of that? |
I think I can get started on the |
Docs for |
my bad, I was looking at the |
@ADmad this is ready for review |
|
||
In addition to the crop position, you can be more specific about the exact crop position using a focal point. This is defined using two offset percentages: `crop-x%-y%`. | ||
|
||
~~~ html | ||
<img src="kayaks.jpg?w=300&h=300&fit=crop-25-75"> | ||
<img src="kayaks.jpg?w=300&h=300&fit=cover-25-75"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be crop-25-75
. For numeric values for position we use runCropReize()
right?
- `fill`: Resizes the image to fit within the width and height boundaries without cropping or distorting the image, and the remaining space is filled with the background color. The resulting image will match the constraining dimensions. | ||
- `fill-max`: Resizes the image to fit within the width and height boundaries without cropping but upscaling the image if it's smaller. The finished image will have remaining space on either width or height (except if the aspect ratio of the new image is the same as the old image). The remaining space will be filled with the background color. The resulting image will match the constraining dimensions. | ||
- `stretch`: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image. | ||
- `crop`: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the [crop](api/crop/) page for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep the crop
option stating it's an alias for cover
.
Just to confirm using
|
that's correct, |
fit=crop
should use the resizecover
method from Intervention #420Intervention v3 has a
cover
method that works as intended for thefit=crop
parameter.https://image.intervention.io/v3/modifying/resizing#cropping--resizing-combined