* bug#11399: 24.1.50; [PATCH] image-mode scaling fix
@ 2012-05-03 16:53 Wolfgang Jenkner
2012-05-14 5:17 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Jenkner @ 2012-05-03 16:53 UTC (permalink / raw)
To: 11399
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#11399: 24.1.50; [PATCH] image-mode scaling fix
2012-05-03 16:53 bug#11399: 24.1.50; [PATCH] image-mode scaling fix Wolfgang Jenkner
@ 2012-05-14 5:17 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2012-05-14 5:17 UTC (permalink / raw)
To: 11399-done
Thank you Wolfgang,
I installed your patch,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-14 5:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 16:53 bug#11399: 24.1.50; [PATCH] image-mode scaling fix Wolfgang Jenkner
2012-05-14 5:17 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.