I see there is an option "interpolate" for utility "convert" to specify the interpolation method.
I want to resize the image with the bilinear or other algorithm in my own program, but I can't find any API to do this with Magick++ C++ library.
How can I set the interpolation method when I resize the image?
How can I set the interpolation method when I resize the image?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How can I set the interpolation method when I resize the image?
I don't use Magick++, but perhaps the answer is to set image->interpolate to the required value, such as BilinearInterpolatePixel.
See magick\image.h and magick\pixel.h
See magick\image.h and magick\pixel.h
snibgo's IM pages: im.snibgo.com
Re: How can I set the interpolation method when I resize the image?
The internal core image struct is opaque to the caller of Magick++, I can't set core image struct's attribute directly.
Finally, I dig into the source code and add a setter function to manipulate the core image sturct for C++ class Magick++::Image to set the interpolation method.
Finally, I dig into the source code and add a setter function to manipulate the core image sturct for C++ class Magick++::Image to set the interpolation method.
Re: How can I set the interpolation method when I resize the image?
Can you post your changes? I can add it to Magick++ when I am back from my holiday