Floating point pixel coordinates
Posted: 2015-03-18T11:32:07-07:00
I had very little experience with ImageMagick C API in the past, mostly by means of finding a similar example code and adopting it to my needs, but now I am trying to accomplish a project in which I don't even know if it is doable with ImageMagick, and don't know where to start.
In short, I want to do my own (fairly complex) warping/distortion of images. I have all the math. What I need is a way to read color information (r,g,b,alpha) for floating point pixel coordinates in the input image. The color should be computed by ImageMagick using an interpolation from the neighboring pixels.
I do see the interpolation discussed here: http://www.imagemagick.org/Usage/misc/#interpolate , where the functionality I need (floating point pixel coordinates) is described. But this is not for C API, just for command line.
Is floating point pixels coordinates (get color via interpolation) feature supported by C API? In MagickWand, I could only find get color methods which use integer pixel coordinates (PixelWand). I couldn't find anything relevant in MagickCore description.
Thank you very much for any feedback!
In short, I want to do my own (fairly complex) warping/distortion of images. I have all the math. What I need is a way to read color information (r,g,b,alpha) for floating point pixel coordinates in the input image. The color should be computed by ImageMagick using an interpolation from the neighboring pixels.
I do see the interpolation discussed here: http://www.imagemagick.org/Usage/misc/#interpolate , where the functionality I need (floating point pixel coordinates) is described. But this is not for C API, just for command line.
Is floating point pixels coordinates (get color via interpolation) feature supported by C API? In MagickWand, I could only find get color methods which use integer pixel coordinates (PixelWand). I couldn't find anything relevant in MagickCore description.
Thank you very much for any feedback!