unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Magnus Henoch <magnus.henoch@gmail.com>
To: 14798@debbugs.gnu.org
Subject: bug#14798: 24.3.50; Enable Imagemagick for Nextstep
Date: Fri, 05 Jul 2013 01:05:01 +0100	[thread overview]
Message-ID: <m2ip0poor6.fsf@mail.gmail.com> (raw)

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	other threads:[~2013-07-05  0:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05  0:05 Magnus Henoch [this message]
2013-07-08 13:26 ` bug#14798: 24.3.50; Enable Imagemagick for Nextstep Jan Djärv
2013-07-08 16:28   ` Glenn Morris
2013-07-08 17:55     ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ip0poor6.fsf@mail.gmail.com \
    --to=magnus.henoch@gmail.com \
    --cc=14798@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).