From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v2] Add native image scaling (bug#33587) Date: Fri, 4 Jan 2019 22:45:58 +0000 Message-ID: <20190104224558.GA63257@breton.holly.idiocy.org> References: <8336qb3upt.fsf@gnu.org> <20190102211241.GA53734@breton.holly.idiocy.org> <837efk335e.fsf@gnu.org> <20190104190914.GA61852@breton.holly.idiocy.org> <8336q82myq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1546641862 4132 195.159.176.226 (4 Jan 2019 22:44:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2019 22:44:22 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 04 23:44:18 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from listsout.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfYCL-0000r5-8l for ged-emacs-devel@m.gmane.org; Fri, 04 Jan 2019 23:44:13 +0100 Original-Received: from localhost ([127.0.0.1]:59783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfYER-0004XT-Se for ged-emacs-devel@m.gmane.org; Fri, 04 Jan 2019 17:46:23 -0500 Original-Received: from eggsout.gnu.org ([209.51.188.92]:58716 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfYEC-0004VR-9T for emacs-devel@gnu.org; Fri, 04 Jan 2019 17:46:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfYEA-0000IB-Cb for emacs-devel@gnu.org; Fri, 04 Jan 2019 17:46:07 -0500 Original-Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:37769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfYE6-0000FH-Lq; Fri, 04 Jan 2019 17:46:03 -0500 Original-Received: by mail-wm1-x344.google.com with SMTP id g67so2546627wmd.2; Fri, 04 Jan 2019 14:46:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5ITNEhaukUfAwUa7Ds4zQIpuT+EXZwGgz9fYtOpBVrI=; b=J4PsSwVW4tuoTu8g5WejhArmQcaAWwlxInbpkyguNWRLK7/bdjgyj1ED+1kWjC/xyY kzY28jy5V0QQIEfv390RBoTbG5gZAEd9pkKv0KOkpuEPHCYR4buEkYwlbxTlAFuPI/6V oVSGc357aa/U2UFCkiKSl9mMF9+NjdWO62396te1m/1Ap3vy8AqeaYNL74PLWdFmZ9Yc Xuy5qjR0wsaRUyctvi880ss6fsKwXr7PdhgP/HaevIzj4Mhf0w7RpZwUzdVKnPL/+uJS nYX8QcZSSitEnuJEEdxbPeR4H4bTgAVDr3Wjx8JckbTLwpZF5JHP/tkjesIhE8l4vvL+ R7Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5ITNEhaukUfAwUa7Ds4zQIpuT+EXZwGgz9fYtOpBVrI=; b=npZ4eI4al/7RDAu5D7Ml0UzYoAK5469RbHF1XLr6SxJopy3Ds3VbZ/sQfaLkdXjvJL WtLbxLYbU7R5gNt9xCRyage6SBHqfz9DxdTIMm0n3R5D1tBomRpaGCC0TAwcGAzRkhwA PjKPqZkegzLggOvTPcVVAgZMfLuWO3/3Z2e8huE/A7djB6YjPj8TktnHTWbWGMwI3VtW pTeG8A06lF5ZqalvJsLh8rA49rxJ1Ci71HghUOkliuThFnesW0sUHbyyBWt1MpVIeZWX AbmYGm8sBEDTY9xpGArMsX0+4l6hvYwA4zJ9e+jkWV4IGY8JSjOiQhW3he6OgFOdnAPT Ws3A== X-Gm-Message-State: AJcUukeptejyPD6gbrK4yccbiO0zz1swTcVK7JTc8J5Bd8nDtieZ0QDV jtcGJsjfvBKOmAKdq1J8W5BOyR5Qyzc= X-Google-Smtp-Source: ALg8bN7YZQ8RwAGVPl94NBmEnDxsR8xEmwMN2dzX9pVe7yjo4RCI/UzUph+HEomrkw/dj6vxtltCBQ== X-Received: by 2002:a1c:f613:: with SMTP id w19mr2634289wmc.0.1546641960921; Fri, 04 Jan 2019 14:46:00 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-9194-40f9-6afc-79fe.holly.idiocy.org. [2001:8b0:3f8:8129:9194:40f9:6afc:79fe]) by smtp.gmail.com with ESMTPSA id f15sm47476470wrt.10.2019.01.04.14.45.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Jan 2019 14:46:00 -0800 (PST) Content-Disposition: inline In-Reply-To: <8336q82myq.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:232179 Archived-At: On Fri, Jan 04, 2019 at 10:21:17PM +0200, Eli Zaretskii wrote: > > Date: Fri, 4 Jan 2019 19:09:14 +0000 > > From: Alan Third > > Cc: emacs-devel@gnu.org > > > > (Another option would be to automatically fall‐back to ImageMagick if > > required, but given that we’re doing this because people are concerned > > about ImageMagick’s security record, I doubt making it’s use automatic > > would appeal.) > > I guess I've misread the code, because I thought we did fall back > automatically. FWIW, I think if the user builds Emacs with > ImageMagick, they already considered the security issues and decided > they are okay with them. We shouldn't second-guess them. If you load an image then use image-mode’s + and - bindings it automatically falls back to ImageMagick, but if you just load and insert an image like this: (insert-image (create-image "image.gif" nil nil :width 25)) it doesn’t. To get :width to do anything you need to specify that you want to use ImageMagick: (insert-image (create-image "image.gif" imagemagick nil :width 25)) I suspect the simplest place to do it would be in create-image, but someone who understands image.el better than me might have a different opinion. (In other words: I hope someone else fancies implementing the fallback, as I’m not very confident digging into lisp.) -- Alan Third