Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <wand/MagickWand.h>
int main(int argc,char **argv) {
MagickWand *magick_wand;
MagickWandGenesis();
magick_wand = NewMagickWand();
MagickReadImage(magick_wand, "magick:logo");
double arguments[] = {
0.5, 0, 0,
1, 100, 0
};
MagickScaleImage(magick_wand, 400, 300);
MagickDistortImage(
magick_wand,
AffineProjectionDistortion,
6,
arguments,
0
);
MagickWriteImage(magick_wand, "./edge_output.png");
MagickWandTerminus();
return 0;
}
Output
==11779== Conditional jump or move depends on uninitialised value(s)
==11779== at 0x542A1B1: ClampToQuantum (in /usr/lib64/libMagickCore-6.Q16.so.2.0.0)
==11779== by 0x542BB16: ResamplePixelColor (in /usr/lib64/libMagickCore-6.Q16.so.2.0.0)
==11779== by 0x5354724: DistortImage (in /usr/lib64/libMagickCore-6.Q16.so.2.0.0)
==11779== by 0x4F60FA7: MagickDistortImage (in /usr/lib64/libMagickWand-6.Q16.so.2.0.0)
==11779== by 0x400885: main (edgeMemory.c:22)
==11779== ...
==11779== ERROR SUMMARY: 240600 errors from 4 contexts (suppressed: 6 from 6)