From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Newsgroups: gmane.emacs.bugs Subject: bug#18797: 24.4; Unable to do image transforms even when emacs is compiled with Imagemagick Date: Wed, 22 Oct 2014 16:30:31 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2b12c1e3b04050608d452 X-Trace: ger.gmane.org 1414009947 17150 80.91.229.3 (22 Oct 2014 20:32:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 20:32:27 +0000 (UTC) Cc: 18797@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 22:32:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xh2Zx-0001E4-P4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 22:32:22 +0200 Original-Received: from localhost ([::1]:60742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2Zv-0003J5-1V for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 16:32:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2Zk-0003EL-Hn for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:32:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh2Zf-0007PN-RU for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:32:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2Zf-0007PJ-N7 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xh2Zf-0001wu-AD for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:32:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 20:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 18797-submit@debbugs.gnu.org id=B18797.14140098807421 (code B ref 18797); Wed, 22 Oct 2014 20:32:03 +0000 Original-Received: (at 18797) by debbugs.gnu.org; 22 Oct 2014 20:31:20 +0000 Original-Received: from localhost ([127.0.0.1]:60258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh2Yx-0001vc-LE for submit@debbugs.gnu.org; Wed, 22 Oct 2014 16:31:20 -0400 Original-Received: from mail-oi0-f42.google.com ([209.85.218.42]:54440) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh2Yv-0001vP-Gq for 18797@debbugs.gnu.org; Wed, 22 Oct 2014 16:31:18 -0400 Original-Received: by mail-oi0-f42.google.com with SMTP id a141so3407813oig.29 for <18797@debbugs.gnu.org>; Wed, 22 Oct 2014 13:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=o6s6b8zPFzUiRc9dNDZZDbi44h2zS+GLpx0q8Lxsxc0=; b=y/SkL6lCxI9yejl9D98A1+qQQWjciX1eBoaTfz9KuRIH2Xv4A9lKof1TmLD+4ZOK8F dJW8k3GtqYXiR+YngR739ExqL8DvVfDoORzyQoLyGcZ9+q5qBaIdK2+mAi8VEcDXtYg9 XH0c7HQqO2suQwUnV79jQHZo0QoEA+209sggXARvseyaOi97qgBB3W4pQFex9BP0dmun a0+rFjt99f/l40rkEIUA/+UmBTGWnW/EebxZgXDrcDZfknFbsUsC8mhTOeZqb6OcO3qS pnKbJGx7Y6e5tapQy9bJf/bMmLd9Ig8z2UY0BpqGe/TzBq7tuk2tb/+1x20/SI7Znkzy kueg== X-Received: by 10.182.210.232 with SMTP id mx8mr359985obc.46.1414009871798; Wed, 22 Oct 2014 13:31:11 -0700 (PDT) Original-Received: by 10.76.110.44 with HTTP; Wed, 22 Oct 2014 13:30:31 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94955 --001a11c2b12c1e3b04050608d452 Content-Type: text/plain; charset=ISO-8859-1 The drawback of tweaking the image-type-header-regexps is that inline images stop working in org-mode. So is there a way for org-mode to render the inline images using imagemagick? Thanks. -- Kaushal Modi On Wed, Oct 22, 2014 at 4:19 PM, Kaushal wrote: > I have posted a complete solution of what worked for me on Emacs SE: > http://emacs.stackexchange.com/a/2458/115 > > I modified the image-type-header-regexps list so that imagemagick is used > to more more than just jpg files. > > > -- > Kaushal Modi > > On Wed, Oct 22, 2014 at 2:50 PM, Kaushal wrote: > >> I went deeper in the references bug posts and I found the answer in bug # >> 10112! >> >> I had to add: >> >> (add-to-list 'image-type-header-regexps '("\\`\377\330" . imagemagick)) >> >> But just for my knowledge, what is "\\`\377\330" ? >> >> >> >> >> -- >> Kaushal Modi >> >> On Wed, Oct 22, 2014 at 2:45 PM, Kaushal wrote: >> >>> Thanks for your reply. >>> >>> I evaluated (setq image-type-header-regexps nil) and verified that it is >>> actually set to nil by doing C-h v on that variable. >>> >>> But (eq image-type 'imagemagick) is still returning nil and I am M-: >>> (image-transform-set-scale 0.1) still does nothing. >>> >>> >>> >>> >>> -- >>> Kaushal Modi >>> >>> On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morris wrote: >>> >>>> >>>> This message was over 1 MB. Please compress attachments in future. >>>> No need to resend this one, since interested people can fetch the >>>> attachment >>>> from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18797#5 . >>>> (But I think it has no relevance anyway.) >>>> >>>> Kaushal wrote: >>>> >>>> > I have compiled emacs with Imagemagick (the config.log file is >>>> attached). >>>> > >>>> > But "M-x image-transform-set-scale" is not working for me. The image >>>> scale >>>> > stays the same when I set the scale to 0.5. I tested it with bot png >>>> and >>>> > jpg images. >>>> > >>>> > But the eimp package is working fine (which uses mogrify from >>>> Imagemagick). >>>> > >>>> > When an image is open in a buffer, evaluating "(eq image-type >>>> > 'imagemagick)" returns "nil". >>>> >>>> Right, so it's not an ImageMagick image, so you can't transform it. >>>> Emacs uses libjpeg for jpgs by default. >>>> Try testing it on a format that Emacs does't support otherwise, eg bmp. >>>> You have to force the images to be created with type imagemagick to be >>>> able to scale them. This remains poorly documented IMO; >>>> http://debbugs.gnu.org/10746 >>>> >>>> > What am I missing in enabling the imagemagick detection for functions >>>> like >>>> > image-transform-set-scale? >>>> >>> >>> >> > --001a11c2b12c1e3b04050608d452 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The drawback of tweaking the image-type-he= ader-regexps is that inline images stop working in org-mode.
So is there a way for org-mode to render the inline images using ima= gemagick?

Thanks.


--
Kaushal Modi

On Wed, Oct 22, 2014 at 4:19 PM, Kaushal <kaushal.modi@gmail.com> wrote:
I have posted a complete= solution of what worked for me on Emacs SE:=A0http://emacs.stackexchange.com/= a/2458/115

I modified the image-type-header-regexps list so that imagemagick is= used to more more than just jpg files.


--
Kaushal Modi

On Wed, Oct 22, 2014 at 2:50 PM, Kaushal <kaushal.modi@gmail.com> wrote:
I went deeper in the ref= erences bug posts and I found the answer in bug # 10112!

I had to add:

=
(add-to-list 'image-type-header-regexps '("\\`\377\330" .=
 imagemagick))
But just for my knowledge, what is =
"\\`\377\330" ?



--
Kaushal Modi

On Wed, Oct 22, 2014 at 2:45 PM, Kaushal <kaushal.modi@gmail.com> wrote:
Thanks for your reply.

I evalua= ted (setq image-type-header-regexps nil) and verified that it is actually s= et to nil by doing C-h v on that variable.
<= br>
But (eq image-type 'imagemagick) is = still returning nil and I am M-: (image-transform-set-scale 0.1) still does= nothing.



--
Kaushal Modi

On Wed, Oct 22, 2014 at 1:52 PM, Glenn Morri= s <rg= m@gnu.org> wrote:

This message was over 1 MB. Please compress attachments in future.
No need to resend this one, since interested people can fetch the attachmen= t
from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18797#5 .=
(But I think it has no relevance anyway.)

Kaushal wrote:

> I have compiled emacs with Imagemagick (the config.log file is attache= d).
>
> But "M-x image-transform-set-scale" is not working for me. T= he image scale
> stays the same when I set the scale to 0.5. I tested it with bot png a= nd
> jpg images.
>
> But the eimp package is working fine (which uses mogrify from Imagemag= ick).
>
> When an image is open in a buffer, evaluating "(eq image-type
> 'imagemagick)" returns "nil".

Right, so it's not an ImageMagick image, so you can't transform it.=
Emacs uses libjpeg for jpgs by default.
Try testing it on a format that Emacs does't support otherwise, eg bmp.=
You have to force the images to be created with type imagemagick to be
able to scale them. This remains poorly documented IMO;
http://debbugs.g= nu.org/10746

> What am I missing in enabling the imagemagick detection for functions = like
> image-transform-set-scale?




--001a11c2b12c1e3b04050608d452--