Last active
June 8, 2017 15:24
-
-
Save juanmanavarro/cc167b42932ed2a9a8e38e51ea2d7461 to your computer and use it in GitHub Desktop.
Use of the MagickDistortImage method from the MagickWand C API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MagickWand *image; | |
int num_args; | |
double args[1] = {.5}; // scale the image to half size | |
double args[1] = {45}; // rotate the image 45 degrees from the center | |
double args[2] = {.5, 45}; // scale and rotate image | |
double args[3] = {0, 0, 45}; // rotate the image from 0,0 | |
double args[4] = {0, 0, .5, 45}; // rotate and scale image | |
double args[6] = {0, 0, .5, 45, 50, 50}; // rotate, scale and translate image to 50,50 | |
num_args = sizeof(args)/sizeof(args[0]); | |
MagickDistortImage(image, ScaleRotateTranslateDistortion, num_args, args, MagickTrue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment