From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Newsgroups: gmane.emacs.devel Subject: Re: imagemagick support on W32 Date: Thu, 30 Sep 2010 22:16:32 -0600 Message-ID: <4CA560A0.50901@gmail.com> References: <4CA53CE5.1020702@gmail.com> <4CA54727.6010900@gmail.com> <4CA54834.4020106@gmail.com> <4CA54E67.5040703@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285906613 31040 80.91.229.12 (1 Oct 2010 04:16:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 04:16:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 01 06:16:49 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1X38-0006Kz-CL for ged-emacs-devel@m.gmane.org; Fri, 01 Oct 2010 06:16:46 +0200 Original-Received: from localhost ([127.0.0.1]:44977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1X37-00026C-Dv for ged-emacs-devel@m.gmane.org; Fri, 01 Oct 2010 00:16:45 -0400 Original-Received: from [140.186.70.92] (port=48881 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1X2z-000266-S1 for emacs-devel@gnu.org; Fri, 01 Oct 2010 00:16:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P1X2y-0006x4-Fb for emacs-devel@gnu.org; Fri, 01 Oct 2010 00:16:37 -0400 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:37045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P1X2y-0006wx-9q for emacs-devel@gnu.org; Fri, 01 Oct 2010 00:16:36 -0400 Original-Received: by gxk24 with SMTP id 24so1527775gxk.0 for ; Thu, 30 Sep 2010 21:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=prQ6WdIRnLZINe8Qq+mL4Rg9Bnnsgzh14JEJ8k8vrpo=; b=iM2Sec8cIxb2cnfh9lMpdt7GHbyxoS1eCdKREdXIV45nYm5zjuJJBvhMDK0dCKHstv DUy5pAzpoEUJ4aoqO6ZYbuaxUq5M4v8EmL/u4JGGXyZ5yLCirOtrurd7H3RNoDXllzEB Nj8lrtAKNisPQ5dsT8yKI21uf63mckHeshIC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=hn/Qg6v0WN1ijrze4MwIx0jiz3wIUz9IzgJ5nK98ChVzuE+E34dcFeW5Ed4n7KyVeO 7PiGP2NiSQMWUf7DCKL1e4ADYVHgCTvkxr1Nw/9lrbPcfOrjHwJ1HsZQZT5Hwek8QU03 uGdjbA2A3C8QJwvnlKV3L8GJLxwlfQLK2U8RY= Original-Received: by 10.150.131.9 with SMTP id e9mr352934ybd.92.1285906595607; Thu, 30 Sep 2010 21:16:35 -0700 (PDT) Original-Received: from [192.168.1.5] (67-41-203-171.hlrn.qwest.net [67.41.203.171]) by mx.google.com with ESMTPS id v38sm384856yba.11.2010.09.30.21.16.34 (version=SSLv3 cipher=RC4-MD5); Thu, 30 Sep 2010 21:16:34 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131129 Archived-At: On 9/30/2010 9:16 PM, Juanma Barranquero wrote: > Yes, something like that, assuming you're trying to use ImageMagick > DLLs and not linking statically. For now, I will go on with the dlls. On a side note: would Emacs require to use the .dlls or could the library also be statically linked in? > On HAVE_NTGUI, macros DEF_IMGLIB_FN and LOAD_IMGLIB_FN create and set > such pointers. On ! HAVE_NTGUI, such pointers are simply redefined to > refer to the original, statically linked functions. > > So, the code that currently calls ImageMagick functions directly, like > NewMagickWand, MagickPingImage, etc, should be changed to call > fn_NewMagickWand, fn_MagickPingImage, etc. That's what I figured. Thanks. > One issue: > > /* Try loading ImageMagick library under probable names. */ > if (!(library = w32_delayed_load (libraries, Qimagemagick))) > return 0; > > You'll have to add the imagemagick libraries to image-library-alist, > of course. But, what is the intention of ImageMagick here? To > substitute libpng, jpeglib, etc? If so, something will have to be done > with respect to image-type-available-p (or, more specifically, > init-image-library) so Emacs "knows" that png, jpeg, tiff, etc are > really available. > > But perhaps I'm misinterpreting the intention of ImageMagick? I assumed that that was the intention of the inclusion of the ImageMagick branch in the first place. Maybe there are other use cases though that I am not aware of. Thanks for the image-library-alist hint. Right now, everything compiles fine (with the addition of my own init_imagemagick_functions function, but when I run (imagemagick-register-types) Emacs crashes. Run under gdb from the src/ directory the output is: Program received signal SIGSEGV, Segmentation fault. 0x6d043295 in GetLastValueInLinkedList () from D:\devel\emacs\emacs-bzr\imagemagick\src\oo-spd\i386\CORE_RL_magick_.dll I try to dig around some more. Christoph