From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: imagemagic in image-mode and image-dired-thumbnail-mode? Date: Sun, 14 Jul 2013 10:32:50 +0200 Message-ID: References: <87a9lp8uxk.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1373790795 28292 80.91.229.3 (14 Jul 2013 08:33:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Jul 2013 08:33:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 14 10:33:15 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 1UyHk3-0007Pm-LW for ged-emacs-devel@m.gmane.org; Sun, 14 Jul 2013 10:33:15 +0200 Original-Received: from localhost ([::1]:33110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyHk3-0003ql-7V for ged-emacs-devel@m.gmane.org; Sun, 14 Jul 2013 04:33:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyHjy-0003qZ-Sa for emacs-devel@gnu.org; Sun, 14 Jul 2013 04:33:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyHjx-0005oz-9I for emacs-devel@gnu.org; Sun, 14 Jul 2013 04:33:10 -0400 Original-Received: from mx2.bahnhof.se ([213.80.101.12]:63314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyHjw-0005oY-Vl for emacs-devel@gnu.org; Sun, 14 Jul 2013 04:33:09 -0400 Original-Received: from localhost (mf.bahnhof.se [213.80.101.20]) by mx2-reinject (Postfix) with ESMTP id DA81DD4ECE; Sun, 14 Jul 2013 10:33:08 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MF2) Original-Received: from mf2.bahnhof.se ([127.0.0.1]) by localhost (mf2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id elIjyVQ85+Rq; Sun, 14 Jul 2013 10:33:01 +0200 (CEST) Original-Received: from mta.verona.se (h-235-102.a149.priv.bahnhof.se [85.24.235.102]) by mf2.bahnhof.se (Postfix) with ESMTP id A807C450085; Sun, 14 Jul 2013 10:33:01 +0200 (CEST) Original-Received: from localhost (unknown [127.0.0.1]) by mta.verona.se (Postfix) with ESMTP id A84E94ECF25; Sun, 14 Jul 2013 08:32:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at verona.se Original-Received: from mta.verona.se ([127.0.0.1]) by localhost (exodia.verona.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9W9bHVIAKDiV; Sun, 14 Jul 2013 10:32:50 +0200 (CEST) Original-Received: from exodia.verona.se (www.verona.se [192.168.200.15]) by mta.verona.se (Postfix) with ESMTP id DF3044ECF24; Sun, 14 Jul 2013 10:32:50 +0200 (CEST) In-Reply-To: <87a9lp8uxk.fsf@gmail.com> (Vitalie Spinu's message of "Sun, 14 Jul 2013 09:25:27 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Mac OS X 10.x X-Received-From: 213.80.101.12 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:161863 Archived-At: Vitalie Spinu writes: > Hello,=20 > > 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. >=20=20 > 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: > > =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 #616 =E2=94=80 lisp/image-mode.el =E2=94=80=E2=94=80 > =E2=94=82 (type (image-type file-or-data nil data-p)) > =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 #616 =E2=94=80 > > 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 ?=3D)] '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 Im= ageMagik 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 > > --=20 Joakim Verona