GNU bug report logs - #11399
24.1.50; [PATCH] image-mode scaling fix

Previous Next

Package: emacs;

Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>

Date: Thu, 3 May 2012 17:33:01 UTC

Severity: normal

Tags: patch

Found in version 24.1.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11399 in the body.
You can then email your comments to 11399 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11399; Package emacs. (Thu, 03 May 2012 17:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wolfgang Jenkner <wjenkner <at> inode.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 03 May 2012 17:33:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: bug-gnu-emacs <at> gnu.org
Cc: Glenn Morris <rgm <at> gnu.org>
Subject: 24.1.50; [PATCH] image-mode scaling fix
Date: Thu, 03 May 2012 18:53:58 +0200
This takes care of a FIXME in image-mode.el, viz. "2 works, but eg 1.9
or 0.5 don't?".  To expand on this a bit: Make sure some image format,
say jpg, is really handled by ImageMagick.  Visit a jpg file and do

M-x i m a g e - t r a n s f o r m - s e t - s c a l e <return> 1 . 9 <return>


2012-05-03  Wolfgang Jenkner  <wjenkner <at> inode.at>

	* image-mode.el (image-transform-resize): Doc fix.
	(image-transform-properties): Default scale is 1 and height should
	be an integer.


=== modified file 'lisp/image-mode.el'
--- lisp/image-mode.el	2012-02-08 03:45:27 +0000
+++ lisp/image-mode.el	2012-05-03 15:48:02 +0000
@@ -634,7 +634,7 @@
  - nil, meaning no resizing.
  - `fit-height', meaning to fit the image to the window height.
  - `fit-width', meaning to fit the image to the window width.
- - A number, which is a scale factor (the default size is 100).")
+ - A number, which is a scale factor (the default size is 1).")
 
 (defvar image-transform-rotation 0.0
   "Rotation angle for the image in the current Image mode buffer.")
@@ -655,8 +655,8 @@
 	   (height
 	    (cond
 	     ((numberp image-transform-resize)
-	      (unless (= image-transform-resize 100)
-		(* image-transform-resize (cdr size))))
+	      (unless (= image-transform-resize 1)
+		(floor (* image-transform-resize (cdr size)))))
 	     ((eq image-transform-resize 'fit-height)
 	      (- (nth 3 (window-inside-pixel-edges))
 		 (nth 1 (window-inside-pixel-edges))))))
@@ -669,7 +669,6 @@
 	,@(if (not (equal 0.0 image-transform-rotation))
 	      (list :rotation image-transform-rotation))))))
 
-;; FIXME 2 works, but eg 1.9 or 0.5 don't?
 (defun image-transform-set-scale (scale)
   "Prompt for a number, and resize the current image by that amount.
 This command has no effect unless Emacs is compiled with






Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 14 May 2012 05:18:01 GMT) Full text and rfc822 format available.

Notification sent to Wolfgang Jenkner <wjenkner <at> inode.at>:
bug acknowledged by developer. (Mon, 14 May 2012 05:18:02 GMT) Full text and rfc822 format available.

Message #10 received at 11399-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 11399-done <at> debbugs.gnu.org
Subject: Re: 24.1.50; [PATCH] image-mode scaling fix
Date: Mon, 14 May 2012 01:17:01 -0400
Thank you Wolfgang,
I installed your patch,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.