Cyrille Bagard wrote:
"grep -nr MagickCoreGenesis /usr/include/" gives no result. I don't
know ImageMagick very well, but I think they broke their versions.
Quite strange/unusual...
ImageMagick 6.2.4.5 which you say is the latest in Debian is more than 2
years old. Any chance you could chase them up to see whats going on there?
Here is a patch which switches to older APIs which should be available
in your version. Does it help?
Thanks,
Daniel
>From 84edd21fc1384267fa48952acf4525a28a7b4842 Mon Sep 17 00:00:00 2001
From: Daniel Drake <[EMAIL PROTECTED]>
Date: Fri, 16 Nov 2007 12:49:29 +0000
Subject: [PATCH] Use older ImageMagick API
Debian ship an ImageMagick that is more than 2 years old. Switch to using
older APIs so that we have compatibility all-round.
---
libfprint/img.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/libfprint/img.c b/libfprint/img.c
index 9bc9a51..3db9248 100644
--- a/libfprint/img.c
+++ b/libfprint/img.c
@@ -231,7 +231,7 @@ static struct fp_img *im_resize(struct fp_img *img,
unsigned int factor)
{
Image *mimg;
Image *resized;
- ExceptionInfo *exception;
+ ExceptionInfo exception;
MagickBooleanType ret;
int new_width = img->width * factor;
int new_height = img->height * factor;
@@ -242,23 +242,23 @@ static struct fp_img *im_resize(struct fp_img *img,
unsigned int factor)
* result, which improves matching performances in my experiments. */
if (!IsMagickInstantiated())
- MagickCoreGenesis(NULL, MagickFalse);
+ InitializeMagick(NULL);
+
+ GetExceptionInfo(&exception);
+ mimg = ConstituteImage(img->width, img->height, "I", CharPixel,
img->data,
+ &exception);
- exception = AcquireExceptionInfo();
-
- mimg = ConstituteImage(img->width, img->height, "I", CharPixel,
img->data, exception);
-
- ClearMagickException(exception);
- resized = ResizeImage(mimg, new_width, new_height, 0, 1.0, exception);
+ GetExceptionInfo(&exception);
+ resized = ResizeImage(mimg, new_width, new_height, 0, 1.0, &exception);
newimg = fpi_img_new(new_width * new_height);
newimg->width = new_width;
newimg->height = new_height;
newimg->flags = img->flags;
- ClearMagickException(exception);
+ GetExceptionInfo(&exception);
ret = ExportImagePixels(resized, 0, 0, new_width, new_height, "I",
- CharPixel, newimg->data, exception);
+ CharPixel, newimg->data, &exception);
if (ret != MagickTrue) {
fp_err("export failed");
return NULL;
@@ -266,7 +266,6 @@ static struct fp_img *im_resize(struct fp_img *img,
unsigned int factor)
DestroyImage(mimg);
DestroyImage(resized);
- DestroyExceptionInfo(exception);
return newimg;
}
--
1.5.3.5
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint