[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: imagemagic in image-mode and image-dired-thumbnail-mode?

From: Vitalie Spinu
Subject: Re: imagemagic in image-mode and image-dired-thumbnail-mode?
Date: Mon, 15 Jul 2013 12:51:24 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

I am wiling to propose a series of patches to image.el and image-mode.el
in order to implement scaling, transform functionality and auto-fit to
image window. From what I see it will be quite an extensive change. So I
ask before doing anything.

First of all there is no image universal api for transforms. The
functions image-transform-XXX in image-mode are very image-mode specific
and all operate by side effects and rely on (many) global variables and
image-toggle-display-image function (the core of image-mode).

So the proposal is to rewrite all those transform functions into a
consistent image transform api and move them into image.el. Then add
interactive transformation commands to image-mode.el, iimage.el,
image-dired.el, gnus etc that will rely on those.

The api could be pushed further by implementing a generic transform map,
and then make all image modes to use it for images at point.

Of course all the above will work only with imagemagick support.


 >> address@hidden
 >> on Sun, 14 Jul 2013 21:17:21 +0200 wrote:

 > Glenn Morris <address@hidden> writes:
 >> address@hidden wrote:
 >>>> Is there a hidden reason why image scaling is not yet implemented?
 >>>> ;; Not yet implemented.
 >>>> ;; (defvar image-transform-minor-mode-map
 >>>> ;;   (let ((map (make-sparse-keymap)))
 >>>> ;;     ;; (define-key map  [(control ?+)] 'image-scale-in)
 >>>> ;;     ;; (define-key map  [(control ?-)] 'image-scale-out)
 >>>> ;;     ;; (define-key map  [(control ?=)] 'image-scale-none)
 >>>> ;;     ;; (define-key map "c f h" 'image-scale-fit-height)
 >>>> ;;     ;; (define-key map "c ]" 'image-rotate-right)
 >>>> ;;     map)
 >>>> ;;   "Minor mode keymap `image-transform-mode'.")
 >>> I worked on scaling support for image mode when I worked on the
 >>> original ImageMagik patch. However, I didnt have time to finish the
 >>> support. The above keymap was probably written by someone else, have a
 >>> look in the log.
 >> No, you wrote it.

 > Interesting.

 >> http://lists.gnu.org/archive/html/emacs-diffs/2010-08/msg00213.html>
 >> It's a shame this stuff was never finished. Do you have time to do it
 >> now?

 > Not really, but I can try uncommenting that code and see what
 > happens. Perhaps I even wrote some notes for myself somewhere...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]