GNU bug report logs -
#14358
Option to use GraphicsMagick instead of ImageMagick
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Tue, 7 May 2013 07:14:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14358 in the body.
You can then email your comments to 14358 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Tue, 07 May 2013 07:14:02 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: emacs
Version: 24.3
Severity: wishlist
Is it possible/desirable for Emacs to be able to use GraphicsMagick
instead of ImageMagick? I'm assuming they provide the same
functionality, but I know nothing about it.
I has a rough'n'ready go at the trivial stuff (see below), but then gave
up with these errors:
image.c: In function 'imagemagick_error':
image.c:7607: warning: cast to pointer from integer of different size
image.c: In function 'imagemagick_load_image':
image.c:7633: error: 'PixelIterator' undeclared (first use in this function)
image.c:7633: error: (Each undeclared identifier is reported only once
image.c:7633: error: for each function it appears in.)
image.c:7633: error: 'iterator' undeclared (first use in this function)
image.c:7635: error: 'MagickPixelPacket' undeclared (first use in this
function)
image.c:7635: error: expected ';' before 'pixel'
image.c:7658: warning: implicit declaration of function 'MagickPingImageBlob'
image.c:7895: warning: implicit declaration of function 'NewPixelIterator'
image.c:7896: error: expected expression before ')' token
image.c:7910: warning: implicit declaration of function 'PixelGetNextIteratorRow'
image.c:7915: warning: implicit declaration of function 'PixelGetMagickColor'
image.c:7915: error: 'pixel' undeclared (first use in this function)
image.c:7923: warning: implicit declaration of function 'DestroyPixelIterator'
image.c: In function 'Fimagemagick_types':
image.c:8023: warning: implicit declaration of function 'GetMagickList'
image.c:8023: warning: assignment makes pointer from integer without a cast
make: *** [image.o] Error 1
=== modified file 'configure.ac'
*** configure.ac 2013-05-07 01:12:22 +0000
--- configure.ac 2013-05-07 01:43:25 +0000
***************
*** 183,188 ****
--- 183,189 ----
OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
+ OPTION_DEFAULT_OFF([graphicsmagick],[use GraphicsMagick rather than ImageMagick])
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
***************
*** 1931,1955 ****
fi
HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes"; then
! if test "${with_imagemagick}" != "no"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
## 6.0.7 does not work. See bug#7955.
## 6.8.2 makes Emacs crash; see Bug#13867.
IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
! PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
! AC_SUBST(IMAGEMAGICK_CFLAGS)
! AC_SUBST(IMAGEMAGICK_LIBS)
if test $HAVE_IMAGEMAGICK = yes; then
AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
! CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
! LIBS="$IMAGEMAGICK_LIBS $LIBS"
AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers)
fi
fi
! fi
HAVE_GTK=no
--- 1932,1976 ----
fi
HAVE_IMAGEMAGICK=no
+ HAVE_GRAPHICSMAGICK=no
+
if test "${HAVE_X11}" = "yes"; then
!
! if test "${with_imagemagick}" != "no" && \
! test "${with_graphicsmagick}" != "yes"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
## 6.0.7 does not work. See bug#7955.
## 6.8.2 makes Emacs crash; see Bug#13867.
IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
! PKG_CHECK_MODULES(MAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
! AC_SUBST(MAGICK_CFLAGS)
! AC_SUBST(MAGICK_LIBS)
if test $HAVE_IMAGEMAGICK = yes; then
AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
! CFLAGS="$CFLAGS $MAGICK_CFLAGS"
! LIBS="$MAGICK_LIBS $LIBS"
AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers)
fi
fi
!
! if test "${with_graphicsmagick}" != "no" && \
! test "${with_imagemagick}" != "no" && \
! test $HAVE_IMAGEMAGICK != yes; then
! GRAPHICSMAGICK_MODULE="GraphicsMagickWand"
! PKG_CHECK_MODULES(MAGICK, $GRAPHICSMAGICK_MODULE, HAVE_GRAPHICSMAGICK=yes, :)
! AC_SUBST(MAGICK_CFLAGS)
! AC_SUBST(MAGICK_LIBS)
!
! if test $HAVE_GRAPHICSMAGICK = yes; then
! AC_DEFINE(HAVE_GRAPHICSMAGICK, 1, [Define to 1 if using GraphicsMagick.])
! CFLAGS="$CFLAGS $MAGICK_CFLAGS"
! LIBS="$MAGICK_LIBS $LIBS"
! fi
! fi
!
! fi dnl HAVE_X11
HAVE_GTK=no
***************
*** 4385,4390 ****
--- 4406,4412 ----
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
+ echo " Does Emacs use graphicsmagick? ${HAVE_GRAPHICSMAGICK}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
=== modified file 'src/Makefile.in'
*** src/Makefile.in 2013-05-07 01:12:22 +0000
--- src/Makefile.in 2013-05-07 01:37:58 +0000
***************
*** 226,233 ****
RSVG_LIBS= @RSVG_LIBS@
RSVG_CFLAGS= @RSVG_CFLAGS@
! IMAGEMAGICK_LIBS= @IMAGEMAGICK_LIBS@
! IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
--- 226,233 ----
RSVG_LIBS= @RSVG_LIBS@
RSVG_CFLAGS= @RSVG_CFLAGS@
! MAGICK_LIBS= @MAGICK_LIBS@
! MAGICK_CFLAGS= @MAGICK_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
***************
*** 320,326 ****
ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
-I$(lib) -I$(srcdir)/../lib \
$(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
! $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
$(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
$(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
--- 320,326 ----
ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
-I$(lib) -I$(srcdir)/../lib \
$(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
! $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(MAGICK_CFLAGS) \
$(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
$(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
***************
*** 397,403 ****
## Construct full set of libraries to be linked.
LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(LIBX_OTHER) $(LIBSOUND) \
! $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_CLOCK_GETTIME) \
$(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
$(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
$(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
--- 397,403 ----
## Construct full set of libraries to be linked.
LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(LIBX_OTHER) $(LIBSOUND) \
! $(RSVG_LIBS) $(MAGICK_LIBS) $(LIB_CLOCK_GETTIME) \
$(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
$(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
$(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
=== modified file 'src/image.c'
*** src/image.c 2013-04-07 04:41:19 +0000
--- src/image.c 2013-05-07 01:50:27 +0000
***************
*** 7473,7479 ****
/***********************************************************************
ImageMagick
***********************************************************************/
! #if defined (HAVE_IMAGEMAGICK)
static Lisp_Object Qimagemagick;
--- 7473,7485 ----
/***********************************************************************
ImageMagick
***********************************************************************/
! #if defined (HAVE_IMAGEMAGICK) || defined (HAVE_GRAPHICSMAGICK)
!
! #ifdef HAVE_GRAPHICSMAGICK
! #define MagickWandGenesis() InitializeMagick(NULL)
! #define MagickWandTerminus DestroyMagick
! #define MagickBooleanType int
! #endif
static Lisp_Object Qimagemagick;
***************
*** 7571,7577 ****
--- 7577,7587 ----
/* The GIF library also defines DrawRectangle, but its never used in Emacs.
Therefore rename the function so it doesn't collide with ImageMagick. */
#define DrawRectangle DrawRectangleGif
+ #ifdef HAVE_GRAPHICSMAGICK
+ #include <wand/magick_wand.h>
+ #else
#include <wand/MagickWand.h>
+ #endif
/* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason.
Emacs seems to work fine with the hidden version, so unhide it. */
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Mon, 04 Dec 2017 03:04:02 GMT)
Full text and
rfc822 format available.
Message #6 received at 14358 <at> debbugs.gnu.org (full text, mbox):
There's no interest in addressing this issue. Closing as wontfix.
Added tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 04 Dec 2017 03:04:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
14358 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 04 Dec 2017 03:04:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 01 Jan 2018 12:24:07 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Sat, 30 Oct 2021 16:22:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Sat, 30 Oct 2021 16:38:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 14358 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Is it possible/desirable for Emacs to be able to use GraphicsMagick
> instead of ImageMagick? I'm assuming they provide the same
> functionality, but I know nothing about it.
>
> I has a rough'n'ready go at the trivial stuff (see below), but then gave
> up with these errors:
Glenn Morris <rgm <at> gnu.org> writes:
> There's no interest in addressing this issue. Closing as wontfix.
Given that we are now no longer recommending ImageMagick, perhaps
GraphicsMagick support feels more relevant now than it used to?
From my point of view, GraphicsMagick has better performance, half as
many dependencies, and way fewer CVE's. Like ImageMagick, it also gives
us "free" support for a ton of different image formats, and "free" new
ones in the future.
On the flip-side, I personally get by just fine with our built-in
support for JPEG, GIF, SVG, PNG and some others (this list will include
WEBP in Emacs 29.1). So I have no idea what need our users have for
support for a wider range of image formats.
One final consideration is that GraphicsMagick support could be a step
towards making our ImageMagick support obsolete.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Wed, 03 Nov 2021 03:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 14358 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
From my point of view, GraphicsMagick has better performance, half as
many dependencies, and way fewer CVE's. Like ImageMagick, it also gives
us "free" support for a ton of different image formats, and "free" new
ones in the future.
Could you explain the significance of the quotation marks? I hope it
doesn't imply doubt about whether GraphicsMagick is free software.
What is the license of GraphicsMagick?
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Wed, 03 Nov 2021 03:55:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 14358 <at> debbugs.gnu.org (full text, mbox):
Richard Stallman <rms <at> gnu.org> writes:
> From my point of view, GraphicsMagick has better performance, half as
> many dependencies, and way fewer CVE's. Like ImageMagick, it also gives
> us "free" support for a ton of different image formats, and "free" new
> ones in the future.
>
> Could you explain the significance of the quotation marks?
It was intended as a way of saying "we get it for free" (i.e. with no
effort) but realizing that at the end of the day we will still have to
work for it.
Sorry if my way of formulating this was unclear.
> I hope it doesn't imply doubt about whether GraphicsMagick is free
> software. What is the license of GraphicsMagick?
There is no doubt that it is free software. It uses the Expat license.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14358
; Package
emacs
.
(Fri, 05 Nov 2021 03:53:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 14358 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > Could you explain the significance of the quotation marks?
> It was intended as a way of saying "we get it for free" (i.e. with no
> effort) but realizing that at the end of the day we will still have to
> work for it.
> Sorry if my way of formulating this was unclear.
The meaning that I guessed was totally different.
That way of expressing a meaning is similar to
sarcasm: it states what you don't mean, not what you do mean.
In general, negative communication isn't clear, so I suggest
carefully avoiding.
If you had said, "as a bonus, we will get advantages X, Y and Z,"
it would have been fully clear.
The word "free" is a special pitfall. I've taught myself _never_ to
use the word "free" except to refer to freedom. If I mean "at no
cost", I say it without "free". I am just as careful about this when
I describes someone else's views as when I state my own.
In a quotation, I replace "free" with "[gratis]"; that means "perse
said something that meant 'gratis'". The square brackets are a
scholarly convention to state that one has emended a quotation.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 03 Dec 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.