how to pass DistortMethod?


  • I have been using ImageMagick's C API called MagickWand. In MagickDistortImage, I don't know how to pass second argument. Below is my code.

    lib.lua

    ffi.cdef([[ typedef void MagickWand;
    MagickBooleanType MagickDistortImage(MagickWand *wand, const DistortMethod method, const size_t, const double *args, const MagickBooleanType bestfit);
    ]])
    image.lua

    local arg = ffi.new("const double[?]",{115.23})
    local tt = handle_result(self, lib.MagickDistortImage(self.wand, Plane2CylinderDistortion, 1, arg, 1))
    In my above code I don't know how to pass second argument.


  • 1
    Posts
    214
    Views
    Log in to reply

Internal error.

Oops! Looks like something went wrong!