-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
API method to set image filter #5825
Comments
Try |
It doesn't work, the "filter" option seems to be ignored. |
We added support for image filters in MagickWand as you suggested. |
Thanks! Maybe this should be reflected in docs, as all existing IM bindings can benefit from the addition. |
Done. |
Is your feature request related to a problem? Please describe.
Some ImageMagick docs recommend using "Distort Resize" instead of simple "Resize" for higher quality slower resizing.
With MagickWand API it means using
MagickDistortImage()
instead ofMagickResizeImage()
. ButMagickDistortImage()
doesn't have a way to define which filter is used for resampling, it just uses currently configured filter, and there's no API methods to change the filter.With commandline IM it's possible:
magick.exe input.png -filter Lanczos -distort Resize 200x200! output.png
So for now I have to run CLI process each time, with obvious drawbacks (disk IO, lost precision on conversions).
Describe the solution you'd like
As suggested in this discussion (Wand is IM binding for Python) a clean solution would be introducing new API methods to get/set filter:
Describe alternatives you've considered
Alternatively,
MagickDistortImage()
could use an additional argumentconst FilterType filter
, similar toMagickResizeImage()
, the argument may be useful for some other DistortMethods as well, not just 'resize'.Additional context
No response
The text was updated successfully, but these errors were encountered: