From: Christophe CURIS <[email protected]>
they are supposed to be amended to 4e55a370bbd085cd73b0bc8ed0e2a169acdb4bfe
---
configure.ac | 1 +
m4/wm_imgfmt_check.m4 | 7 +++++--
wrlib/imgformat.h | 2 +-
wrlib/load.c | 2 +-
wrlib/load_magick.c | 10 ++++------
5 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4e3501a..3d42c61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -725,6 +725,7 @@ AC_ARG_ENABLE([magick],
[enable_magick=auto])
WM_IMGFMT_CHECK_MAGICK
+
dnl PPM Support
dnl ===========
# The PPM format is always enabled because we have built-in support for the
format
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 535a1c5..af43f71 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -245,15 +245,18 @@ AS_IF([test "x$enable_xpm" = "xno"],
AM_CONDITIONAL([USE_XPM], [test "x$enable_xpm" != "xno"])dnl
]) dnl AC_DEFUN
+
# WM_IMGFMT_CHECK_MAGICK
-# -------------------
+# ----------------------
#
-# Check for MAGICK file support through 'libMagickWand'
+# Check for MagickWand library to support more image file formats
# The check depends on variable 'enable_magick' being either:
# yes - detect, fail if not found
# no - do not detect, disable support
# auto - detect, disable if not found
#
+# When found, store the appropriate compilation flags in MAGICKFLAGS
+# and MAGICKLIBS, and append info to the variable 'supported_gfx'
# When not found, append info to variable 'unsupported'
AC_DEFUN_ONCE([WM_IMGFMT_CHECK_MAGICK],
[WM_LIB_CHECK([MAGICK], ["$IMLIBS"], [MagickGetImagePixels], [$XLFLAGS $XLIBS],
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
index ea80e56..0d3b9d4 100644
--- a/wrlib/imgformat.h
+++ b/wrlib/imgformat.h
@@ -75,7 +75,7 @@ RImage *RLoadWEBP(const char *file);
#ifdef USE_MAGICK
RImage *RLoadMagick(const char *file_name);
- #endif
+#endif
/*
* Function for Saving in a specific format
diff --git a/wrlib/load.c b/wrlib/load.c
index 477e92d..df0ae9f 100644
--- a/wrlib/load.c
+++ b/wrlib/load.c
@@ -175,7 +175,7 @@ RImage *RLoadImage(RContext * context, const char *file,
int index)
#ifdef USE_MAGICK
/* generic file format support using ImageMagick
* BMP, PCX, PICT, SVG, ...
- */
+ */
image = RLoadMagick(file);
break;
#else
diff --git a/wrlib/load_magick.c b/wrlib/load_magick.c
index b08e591..397ed34 100644
--- a/wrlib/load_magick.c
+++ b/wrlib/load_magick.c
@@ -20,7 +20,7 @@
* MA 02110-1301, USA.
*/
-#include <config.h>
+#include "config.h"
#include <X11/Xlib.h>
#include <wand/magick_wand.h>
@@ -28,7 +28,8 @@
#include "wraster.h"
#include "imgformat.h"
-RImage * RLoadMagick(const char *file_name)
+
+RImage *RLoadMagick(const char *file_name)
{
RImage *image = NULL;
unsigned char *ptr;
@@ -44,7 +45,7 @@ RImage * RLoadMagick(const char *file_name)
m_wand = NewMagickWand();
/* set the default background as transparent */
- bg_wand = NewPixelWand ();
+ bg_wand = NewPixelWand();
PixelSetColor(bg_wand, "none");
MagickSetBackgroundColor(m_wand, bg_wand);
@@ -56,7 +57,6 @@ RImage * RLoadMagick(const char *file_name)
w = MagickGetImageWidth(m_wand);
h = MagickGetImageHeight(m_wand);
- //fprintf(stderr, "%lu x %lu\n", w,h);
hasAlfa = MagickGetImageAlphaChannel(m_wand);
@@ -83,8 +83,6 @@ bye:
DestroyPixelWand(bg_wand);
MagickClearException(m_wand);
m_wand = DestroyMagickWand(m_wand);
- /* destroy is called when exiting wmaker */
- /* MagickWandTerminus(); */
return image;
}
--
1.9.2
--
To unsubscribe, send mail to [email protected].