Page 1 of 1
How can I set the interpolation method when I resize the image?
Posted: 2014-12-01T23:47:58-07:00
by ichaozai
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?
Re: How can I set the interpolation method when I resize the image?
Posted: 2014-12-02T00:22:34-07:00
by snibgo
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
Re: How can I set the interpolation method when I resize the image?
Posted: 2014-12-03T00:17:32-07:00
by ichaozai
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.
Re: How can I set the interpolation method when I resize the image?
Posted: 2014-12-03T06:14:17-07:00
by dlemstra
Can you post your changes? I can add it to Magick++ when I am back from my holiday