emacs-devel
[Top][All Lists]
Advanced

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

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


From: joakim
Subject: Re: imagemagic in image-mode and image-dired-thumbnail-mode?
Date: Sun, 14 Jul 2013 10:32:50 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Vitalie Spinu <address@hidden> writes:

> Hello, 
>
> For a new process-output-image-manipulation project I was looking for a
> generic image mode. Surprisingly, it looks like none of the existing
> modes is flexible/customizable/feature rich enough to be used as a
> prototype for such a project.
>  
> Particularly, an essential feature for image scaling, imagemagic, is
> still not supported by basic image modes. Image-dired-thumbnail-mode has
> no idea of imagemagic at all.  Image-mode cannot open imagemagic types
> as image-toggle-display-image hardcodes image type:
>
> ╭──────── #616 ─ lisp/image-mode.el ──
> │      (type (image-type file-or-data nil data-p))
> ╰──────── #616 ─
>
> 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.

At any rate, as I recall, there are no reasons not to implement scaling
support in image mode, Someone(TM) just needs to invest some energy. It
shouldnt even be very hard.

>
> I naturally wonder if there should be a global user custom variable
> like:
>
>    (defcustom image-view-type (and (image-type-available-p 'imagemagick)
>                                    'imagemagick))
>
> with all image modes taking it into account?
>
> On a related note, wouldn't image-mode be better off if implemented on
> top of some image-thumbnail-mode? Or maybe better, shouldn't image-mode
> support multiple images per buffer, and then other modes like
> image-dired-thumbnail-mode to derive from it?
>
>     Vitalie
>
>

-- 
Joakim Verona



reply via email to

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