From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: imagemagic in image-mode and image-dired-thumbnail-mode? Date: Sun, 14 Jul 2013 09:25:27 +0200 Organization: EUR Message-ID: <87a9lp8uxk.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1373786749 29034 80.91.229.3 (14 Jul 2013 07:25:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Jul 2013 07:25:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 14 09:25:48 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UyGgm-0007XO-D6 for ged-emacs-devel@m.gmane.org; Sun, 14 Jul 2013 09:25:48 +0200 Original-Received: from localhost ([::1]:53137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyGgl-0004RC-Te for ged-emacs-devel@m.gmane.org; Sun, 14 Jul 2013 03:25:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyGgg-0004Qv-NJ for emacs-devel@gnu.org; Sun, 14 Jul 2013 03:25:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyGgd-0003Kh-OS for emacs-devel@gnu.org; Sun, 14 Jul 2013 03:25:42 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyGgd-0003KW-HZ for emacs-devel@gnu.org; Sun, 14 Jul 2013 03:25:39 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UyGgb-0007Q6-Q0 for emacs-devel@gnu.org; Sun, 14 Jul 2013 09:25:37 +0200 Original-Received: from dhcp-077-249-018-128.chello.nl ([77.249.18.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Jul 2013 09:25:37 +0200 Original-Received: from spinuvit by dhcp-077-249-018-128.chello.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Jul 2013 09:25:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dhcp-077-249-018-128.chello.nl User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:kGWGSQzZvkMgDMb+3jNcjmZeNOs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161862 Archived-At: 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 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