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 14:50:57 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ced3c0f202a05060770c2 X-Trace: ger.gmane.org 1414003948 13420 80.91.229.3 (22 Oct 2014 18:52:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 18:52:28 +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 20:52:17 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 1Xh116-0001kv-IS for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 20:52:16 +0200 Original-Received: from localhost ([::1]:60283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh116-00054G-7U for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 14:52:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh10x-00052k-FO for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 14:52:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh10s-0002BJ-JE for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 14:52:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh10s-0002BF-F3 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 14:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xh10s-0007pZ-45 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 14:52:02 -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 18:52:02 +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.141400390730080 (code B ref 18797); Wed, 22 Oct 2014 18:52:02 +0000 Original-Received: (at 18797) by debbugs.gnu.org; 22 Oct 2014 18:51:47 +0000 Original-Received: from localhost ([127.0.0.1]:60238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh10c-0007p4-4C for submit@debbugs.gnu.org; Wed, 22 Oct 2014 14:51:46 -0400 Original-Received: from mail-ob0-f176.google.com ([209.85.214.176]:50357) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh10Z-0007oo-Rq for 18797@debbugs.gnu.org; Wed, 22 Oct 2014 14:51:44 -0400 Original-Received: by mail-ob0-f176.google.com with SMTP id m8so3410420obr.7 for <18797@debbugs.gnu.org>; Wed, 22 Oct 2014 11:51:38 -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=FIGMb5kxL9QiLygwo70pCvTtT3/V9qh56K6bco0qvso=; b=DX4WKi3f8s9gUZ266VXQ67R6bjgCynyT8k8R+a8FawMHOnpXZZ3GWp3zxNDRZ0H7h/ QiJzzFmDN0w6Ey+YbQNYVeADRPefYbfWaDumfyBpGHF1tBginpxb65dpqUektiZD3IQp TjblotXt8I0KyVASflx+xi+yFDy9mG5PTi+Ckn/cRcBwK1133ni1ANFsxcHdnQ6xLqDe 6mABFzG8cnUDVJuL4MnpOsdkOYJf0b8Izu+trYabZABwSCE9XUAStmyDj8GSAFvekXRf aQ4XLsn49DpxJpI2qdHwgKXvaYfK9e7X2OThkLG5/bC73TVsGe/sxT0uf5XtvrOk4A0c NgSw== X-Received: by 10.202.174.76 with SMTP id x73mr58573oie.12.1414003898127; Wed, 22 Oct 2014 11:51:38 -0700 (PDT) Original-Received: by 10.76.110.44 with HTTP; Wed, 22 Oct 2014 11:50:57 -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:94951 --001a113ced3c0f202a05060770c2 Content-Type: text/plain; charset=ISO-8859-1 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? >> > > --001a113ced3c0f202a05060770c2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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 knowl=
edge, 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?


--001a113ced3c0f202a05060770c2--