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:19:07 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013cc45e5e841f050608ab8e X-Trace: ger.gmane.org 1414009221 5489 80.91.229.3 (22 Oct 2014 20:20:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 20:20:21 +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:20:16 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 1Xh2OG-0003ij-5M for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 22:20:16 +0200 Original-Received: from localhost ([::1]:60692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2OF-0008IW-M9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 16:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2O7-0008GI-Pr for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh2O3-0002gv-B5 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:20:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh2O3-0002gX-8B for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xh2O2-0001cW-IK for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 16:20: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 20:20: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.14140091986211 (code B ref 18797); Wed, 22 Oct 2014 20:20:02 +0000 Original-Received: (at 18797) by debbugs.gnu.org; 22 Oct 2014 20:19:58 +0000 Original-Received: from localhost ([127.0.0.1]:60251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh2Nw-0001c4-So for submit@debbugs.gnu.org; Wed, 22 Oct 2014 16:19:57 -0400 Original-Received: from mail-oi0-f46.google.com ([209.85.218.46]:40405) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh2Nt-0001bq-VL for 18797@debbugs.gnu.org; Wed, 22 Oct 2014 16:19:54 -0400 Original-Received: by mail-oi0-f46.google.com with SMTP id h136so3354765oig.19 for <18797@debbugs.gnu.org>; Wed, 22 Oct 2014 13:19:48 -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=ozrUf8afymNB+jvlJQ3/v09pjwB08auWp6cBQmHJzkg=; b=R5AINdQXOvYE7+4ChcqGZhp3dtEaRrK0cAUdJvJrEWjFBnRDODyNWiTJIOnA3mYge0 RylJPmpbBgQMVxohYCjl+XZ9HJceTEjyj7Tyr1Q9LrCtIeFPbnGsWq3bgEWcHWKHOcNe 6seZM887DswA58gfaIugmyZaUhVBJFtaVxsE5rhcS49DnUKpWhO3ZKDCO+FEeud/blIo Ju/zKDXbtHVNszgbKEja5diEsjXnUZUjf0NCIHln6j7N4/JCWsLS6lo2O6M2hAbGBIru wqTaGlVRCApoU517qhmby3JcMZPunJnre9wlSj21/YvFSA2eWnnE1nwLEh0LgIWixu/L srxg== X-Received: by 10.182.89.194 with SMTP id bq2mr352261obb.12.1414009188152; Wed, 22 Oct 2014 13:19:48 -0700 (PDT) Original-Received: by 10.76.110.44 with HTTP; Wed, 22 Oct 2014 13:19:07 -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:94954 --089e013cc45e5e841f050608ab8e Content-Type: text/plain; charset=ISO-8859-1 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? >>> >> >> > --089e013cc45e5e841f050608ab8e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I have posted a complete solutio= n of what worked for me on Emacs SE:=A0http://emacs.stackexchange.com/a/2458/115

I modified the imag= e-type-header-regexps list so that imagemagick is used to more more than ju= st 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?



--089e013cc45e5e841f050608ab8e--