1 | /* |
1 | /* |
2 | magick-aux.c - Part of psiconv, a PSION 5 file formats converter |
2 | magick-aux.c - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 2000 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 2000-2004 Frodo Looijaard <frodol@dds.nl> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
20 | #include "config.h" |
20 | #include "config.h" |
21 | |
21 | |
22 | #if IMAGEMAGICK |
22 | #if IMAGEMAGICK |
23 | |
23 | |
24 | #include "magick-aux.h" |
24 | #include "magick-aux.h" |
25 | #include <magick/magick.h> |
|
|
26 | #include <magick/config.h> |
|
|
27 | |
25 | |
28 | /* This is so ugly, but it is the only way to make ImageMagick 5 behave |
26 | #endif |
29 | * properly. It really needs a better interface. |
|
|
30 | * OpenModules makes sure all needed modules are loaded. But it may not |
|
|
31 | * be called until some things are initialized, hence the extra |
|
|
32 | * GetMagickInfo call. Ugh. |
|
|
33 | */ |
|
|
34 | |
27 | |
35 | extern void OpenModules(void); |
28 | #ifdef DMALLOC |
|
|
29 | #include "dmalloc.h" |
|
|
30 | #endif |
36 | |
31 | |
|
|
32 | #if IMAGEMAGICK |
|
|
33 | |
|
|
34 | /* This used to be very ugly, but nowadays it is much better */ |
|
|
35 | |
37 | MagickInfo * GetMagickFileList(void) |
36 | const MagickInfo * GetMagickFileList(void) |
38 | { |
37 | { |
39 | GetMagickInfo(NULL); |
38 | ExceptionInfo exc; |
40 | #if defined(HasLTDL) |
39 | GetExceptionInfo(&exc); |
41 | OpenModules(); |
40 | OpenModules(&exc); |
42 | #endif |
|
|
43 | return GetMagickInfo(NULL); |
41 | return GetMagickInfo(NULL,&exc); |
44 | } |
42 | } |
45 | |
43 | |
46 | #endif /* IMAGEMAGICK */ |
44 | #endif /* IMAGEMAGICK */ |