-
Notifications
You must be signed in to change notification settings - Fork 840
Document legacy and clarify bestfit parameters for Imagick::resizeImage #5056
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
base: master
Are you sure you want to change the base?
Conversation
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.
According to the changelog file the legacy property has also been added to a few other methods. Would you be able to implement these as well?
To be exact, this is the changelog of Imagick 3.4.0.
Imagick::adaptiveResizeImage, Imagick::cropThumbnailImage Imagick::resizeImage,
Imagick::scaleImage, and Imagick::thumbnailImage have all had a rounding bug fixed.
An additional parameter has been added to each of them, 'bool $legacy'. If legacy
is true, the calculations are done with the small rounding bug that existed in
Imagick before 3.4.0. If false, the calculations should produce the same results as
ImageMagick CLI does.
Co-authored-by: Jordi Kroon <[email protected]>
Co-authored-by: Jordi Kroon <[email protected]>
jordikroon
left a comment
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.
Thanks! Looks good to me. Unless someone objects.
This PR clarifies two optional parameters of
Imagick::resizeImage()due to this Issue$legacyparameter, which was undocumented and not self-explanatory.$bestfitto describe its observable behavior more clearly.The changes are intentionally minimal and avoid ImageMagick implementation details.