From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Images :scale and :width/:height relation Date: Fri, 01 Sep 2023 12:46:11 +0200 Message-ID: <87ledqcgss.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21000"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: "emacs-devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 01 12:47:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qc1gH-0005Al-Uv for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Sep 2023 12:47:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc1fi-0001wZ-Ii; Fri, 01 Sep 2023 06:46:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qc1fZ-0001qo-0j for emacs-devel@gnu.org; Fri, 01 Sep 2023 06:46:31 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qc1fL-0001MX-PG for emacs-devel@gnu.org; Fri, 01 Sep 2023 06:46:28 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=MT/HcsHA kNjXhu2ur42bGAxrsiXdPi6egqV+p2CRwAo=; h=date:subject:to:from; d=ledu-giraud.fr; b=issyC+d1WetUyIbkmn96QnL+xP5EnUymnm9jMXf+UxcNTTuJeF EbPLD/qYOnHRgkwLMGpfZRWL66RWleTC5fAA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=MT/HcsHAkNjXhu2u r42bGAxrsiXdPi6egqV+p2CRwAo=; h=date:subject:to:from; d=ledu-giraud.fr; b=0OutT++9l8QzT5GLJAqOIr30V81SbMhisuXiqk5HBJ2xMrbGSv 9TGF1l2svHYdNkpu5enhfdaHTI6TeBkYYeF1u7gyEHJBP2wIo/eUGQm59MdqI4Zg+KVJjd Gg/7W50P2N0l96KFK6DBQrXP9xjCzlFbPOXS0lJxTq1aR9/xe2MEk1Jmt3QawzCxJUPj7S 82qt9+VFq6RPGlFogysLA/pdbZPKCUxkBCOzkBV7hVKrLuRTMAGF1dEklLxpvfuVtROvBU 73uMIkI75J/SOKbGGWVIJlPOOHNz7Z01KOjAmvXq7eJz5YY1WKR2baFRusUe+QW+1ooTFq FXLCZirzPSSA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 38f94491 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 1 Sep 2023 12:46:13 +0200 (CEST) Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309756 Archived-At: Hi, For the need of bug#65581, I'd like to have access to the current scale of an image. But it seems that this one does not always reflect reality. For instance, you can have a image with an original width of 500 scaled down to a width of 100 (by mean of the :width keyword) and its :scale keyword will still be 1. In "(elisp) Image Descriptors", it is said that: If both =E2=80=98:scale=E2=80=99 and =E2=80=98:height=E2=80=99/=E2=80= =98:width=E2=80=99 are specified, the height/width will be adjusted by the specified scaling factor. But it does not seems to work the other way around. Wouldn't it be a good thing if 'create-image' return a =C2=AB=C2=A0normalized=C2=A0=C2=BB im= age spec where the :width, :height and :scale are filled and kept in sync? If yes, I think we should have answers for the following questions: - Does :scale have priority over :width or :height? Or the opposite? =20=20=20 - What would be the :scale of an image that does not preserve aspect ratio? --=20 Manuel Giraud