GNU bug report logs - #14798
24.3.50; Enable Imagemagick for Nextstep

Previous Next

Package: emacs;

Reported by: Magnus Henoch <magnus.henoch <at> gmail.com>

Date: Fri, 5 Jul 2013 00:06:02 UTC

Severity: wishlist

Tags: patch

Found in version 24.3.50

Done: Jan Djärv <jan.h.d <at> swipnet.se>

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 14798 in the body.
You can then email your comments to 14798 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14798; Package emacs. (Fri, 05 Jul 2013 00:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Magnus Henoch <magnus.henoch <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 05 Jul 2013 00:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Magnus Henoch <magnus.henoch <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Enable Imagemagick for Nextstep
Date: Fri, 05 Jul 2013 01:05:01 +0100
Severity: wishlist
Tags: patch

As I'd like to be able to resize images in Emacs on Nextstep, I had a
look at what needs to be changed to enable Imagemagick on Nextstep.  Not
very much, it turns out; see diff below.

I'm not sure what it would take to support MagickExportImagePixels.  The
code tries to pass ximg->data as a parameter, but ximg is of type
XImagePtr, and on Nextstep the types are:

  typedef Pixmap XImagePtr;
  typedef void *Pixmap;

Nevertheless, it seems to work without that part.

Regards,
Magnus

diff --git a/configure.ac b/configure.ac
index baf8aab..0333898 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2041,7 +2041,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" =
 fi
 
 HAVE_IMAGEMAGICK=no
-if test "${HAVE_X11}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "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.
diff --git a/src/image.c b/src/image.c
index a3e103f..a2328dc 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8054,7 +8054,9 @@ imagemagick_load_image (struct frame *f, struct image *img,
 
   init_color_table ();
 
-#ifdef HAVE_MAGICKEXPORTIMAGEPIXELS
+  /* XXX: it might be easy to get this to work for NS as well.
+     Since ximg is void*, ximg->data is not defined. */
+#if defined(HAVE_MAGICKEXPORTIMAGEPIXELS) && !defined(HAVE_NS)
   if (imagemagick_render_type != 0)
     {
       /* Magicexportimage is normally faster than pixelpushing.  This




Reply sent to Jan Djärv <jan.h.d <at> swipnet.se>:
You have taken responsibility. (Mon, 08 Jul 2013 13:28:02 GMT) Full text and rfc822 format available.

Notification sent to Magnus Henoch <magnus.henoch <at> gmail.com>:
bug acknowledged by developer. (Mon, 08 Jul 2013 13:28:03 GMT) Full text and rfc822 format available.

Message #10 received at 14798-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Magnus Henoch <magnus.henoch <at> gmail.com>
Cc: 14798-done <at> debbugs.gnu.org
Subject: Re: bug#14798: 24.3.50; Enable Imagemagick for Nextstep
Date: Mon, 8 Jul 2013 15:26:58 +0200
Hello.

Checked in into trunk.

Thanks,

	Jan D.

5 jul 2013 kl. 02:05 skrev Magnus Henoch <magnus.henoch <at> gmail.com>:

> Severity: wishlist
> Tags: patch
> 
> As I'd like to be able to resize images in Emacs on Nextstep, I had a
> look at what needs to be changed to enable Imagemagick on Nextstep.  Not
> very much, it turns out; see diff below.
> 
> I'm not sure what it would take to support MagickExportImagePixels.  The
> code tries to pass ximg->data as a parameter, but ximg is of type
> XImagePtr, and on Nextstep the types are:
> 
>  typedef Pixmap XImagePtr;
>  typedef void *Pixmap;
> 
> Nevertheless, it seems to work without that part.
> 
> Regards,
> Magnus
> 
> diff --git a/configure.ac b/configure.ac
> index baf8aab..0333898 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2041,7 +2041,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" =
> fi
> 
> HAVE_IMAGEMAGICK=no
> -if test "${HAVE_X11}" = "yes"; then
> +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "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.
> diff --git a/src/image.c b/src/image.c
> index a3e103f..a2328dc 100644
> --- a/src/image.c
> +++ b/src/image.c
> @@ -8054,7 +8054,9 @@ imagemagick_load_image (struct frame *f, struct image *img,
> 
>   init_color_table ();
> 
> -#ifdef HAVE_MAGICKEXPORTIMAGEPIXELS
> +  /* XXX: it might be easy to get this to work for NS as well.
> +     Since ximg is void*, ximg->data is not defined. */
> +#if defined(HAVE_MAGICKEXPORTIMAGEPIXELS) && !defined(HAVE_NS)
>   if (imagemagick_render_type != 0)
>     {
>       /* Magicexportimage is normally faster than pixelpushing.  This
> 
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14798; Package emacs. (Mon, 08 Jul 2013 16:29:02 GMT) Full text and rfc822 format available.

Message #13 received at 14798 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 14798 <at> debbugs.gnu.org
Cc: jan.h.d <at> swipnet.se, magnus.henoch <at> gmail.com
Subject: Re: bug#14798: 24.3.50; Enable Imagemagick for Nextstep
Date: Mon, 08 Jul 2013 12:28:35 -0400
It should be mentioned in NEWS that NS builds can now be built with
ImageMagick support. (Are there are any visible consequences to the
end-user due to MagickExportImagePixels not working; ie does that need
any documentation changes?)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14798; Package emacs. (Mon, 08 Jul 2013 17:57:01 GMT) Full text and rfc822 format available.

Message #16 received at 14798 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14798 <at> debbugs.gnu.org, magnus.henoch <at> gmail.com
Subject: Re: bug#14798: 24.3.50; Enable Imagemagick for Nextstep
Date: Mon, 8 Jul 2013 19:55:53 +0200
Hello.

8 jul 2013 kl. 18:28 skrev Glenn Morris <rgm <at> gnu.org>:

> 
> It should be mentioned in NEWS that NS builds can now be built with
> ImageMagick support.

Done.

> (Are there are any visible consequences to the
> end-user due to MagickExportImagePixels not working; ie does that need
> any documentation changes?)

No, it is just an optimization.

	Jan D.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 06 Aug 2013 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.