Open PMunch opened 7 years ago
Stumbled upon the same problem. Turned out it was using libmagick7 when this tool seem to have been written for version 6.
I seem to be facing a similar issue here:
cc -Wall -std=c99 `pkg-config --cflags MagickWand xcb` -c xwobf.c
xwobf.c:29:10: fatal error: MagickWand/MagickWand.h: No such file or directory
#include <MagickWand/MagickWand.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.`
Makefile:31: recipe for target 'xwobf.o' failed
make: *** [xwobf.o] Error 1
So, I'm running fedora, and I encountered the same error as @ossix. I worked around it ...
sudo ln -s wand /usr/include/ImageMagick-6/MagickWand
diff --git a/xwobf.c b/xwobf.c
index 88dc631..ac643e2 100644
--- a/xwobf.c
+++ b/xwobf.c
@@ -191,14 +191,14 @@ void obscure_rectangle(rectangle_t *rec, int pixel_size, int fuzzy)
// This is where the magick happens
(void)MagickResizeImage(obs_wand, (rec->w)/pixel_size, (rec->h)/pixel_size,
- PointFilter);
+ PointFilter, pixel_size);
if (fuzzy) {
(void)MagickBlurImage(obs_wand, 0, 1);
}
(void)MagickResizeImage(obs_wand, rec->w, rec->h,
- PointFilter);
+ PointFilter, pixel_size);
- (void)MagickCompositeImage(wand, obs_wand, OverCompositeOp, MagickTrue, rec->x, rec->y);
+ (void)MagickCompositeImage(wand, obs_wand, OverCompositeOp, rec->x, rec->y);
obs_wand = DestroyMagickWand(obs_wand);
}
It seems to run. :shrug:
Had some trouble getting it to compile. It was complaining about too few and too many arguments to various Magick functions. I removed the trailing 0 from all
MagickResizeImage
calls and added aMagickTrue
as the fourth argument toMagickCompositeImage
to comply with this: https://www.imagemagick.org/api/magick-image.phpAfter that everything compiles fine. Is this an ImageMagick version issue?