Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wouldn't compile #5

Open
PMunch opened this issue Aug 9, 2017 · 3 comments
Open

Wouldn't compile #5

PMunch opened this issue Aug 9, 2017 · 3 comments

Comments

@PMunch
Copy link

PMunch commented Aug 9, 2017

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 a MagickTrue as the fourth argument to MagickCompositeImage to comply with this: https://www.imagemagick.org/api/magick-image.php

After that everything compiles fine. Is this an ImageMagick version issue?

@svvac
Copy link

svvac commented Jan 5, 2018

Stumbled upon the same problem. Turned out it was using libmagick7 when this tool seem to have been written for version 6.

@brihadeesh
Copy link

brihadeesh commented May 10, 2018

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

@sbuller
Copy link

sbuller commented Jan 11, 2019

So, I'm running fedora, and I encountered the same error as @ossix.
I worked around it ...

  • I installed ImageMagick-devel
  • I created a link for the include directory sudo ln -s wand /usr/include/ImageMagick-6/MagickWand
  • I made a couple small changes as follows:
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. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants