From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dov Grobgeld Newsgroups: gmane.emacs.devel Subject: Re: Resolution for rasterizing svg images Date: Tue, 8 Dec 2020 16:41:00 +0200 Message-ID: References: <87360gjs15.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002340ea05b5f4efe9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 08 15:42:52 2020 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 1kmeCa-0006zF-5F for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Dec 2020 15:42:52 +0100 Original-Received: from localhost ([::1]:34836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmeCZ-0007eA-5i for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Dec 2020 09:42:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmeB1-0006Jl-Io for emacs-devel@gnu.org; Tue, 08 Dec 2020 09:41:17 -0500 Original-Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:34404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmeAz-0003wu-LU for emacs-devel@gnu.org; Tue, 08 Dec 2020 09:41:15 -0500 Original-Received: by mail-ua1-x929.google.com with SMTP id t19so5684746uaq.1 for ; Tue, 08 Dec 2020 06:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pLu/7qeWZ6rsLYOeoIZbrjsVy3ibtnr0lml6AXHEgL8=; b=XEgeUwhYUKZjHYe3ilH753U4C9Jq9ZQB0AR7Vtwph3tY4/NoS+TkBlG8/ZiJKpITQp tv5kDcA0lJLhiGTukUowwqJSz3Htr0f3VJDiwr8cNCF9pRsD5tyhviwSjJ97PmuPjRqR liJJQkfAip6Q1skJqffHNJsD/JvxDbtoyulM1/FSsx7bDwMEd3AjIfv6y0LPjuu68ef0 +Ktz+DJoW1xsn5+CHKNk3jKEo9JDM4XwSuDxJFXPwLAK06v+iq6qVg+zhN2hL3q9qrwh 4pFQutLnCVehjC38zzPpLDgqFK8XW9toN0H0JzlrZ4ckXUe7hWpyFiT+B+hxEhHzHwfz kigw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pLu/7qeWZ6rsLYOeoIZbrjsVy3ibtnr0lml6AXHEgL8=; b=gK0cEoprbAjwztg9/pnG0msBC7sT07nqxZa0H+kaTPuEDrNVmGeqSub0+2MhVIy7AZ zhr0mpkTPYAKLWkjeSOaMtxQXXF+5gKz3n0EnF9GztoEolS/+qc/uXZaNZI/hg2B1ELu 0QFUF2CyCL6obJHHD7Lf80ZdogasS4ScEJ1+Qods4DZEiMMJPu7sHvOIIg1Wyyek6vFd CQgRGL4FsDd/0oEW8Pteh2GXpPYrcZkuu5g0zY1rmDQ0soI7uQpa+cneGnmee+6L8ebV YjC1dirIMp61prlFWq3MvZ6UOCziOCfRZ5wbJyGFB6CQdtQKD/sRXszkPKZyxO82RwW4 c6vQ== X-Gm-Message-State: AOAM53349IGFkwdVAF3DthouiVElGYfJq+/S2lN/sDsqVU9tMVTAvVhZ 2FblGbHJLUyNjKTfoierIZ2+e2tsLdyDYte1hG4= X-Google-Smtp-Source: ABdhPJzuKb/g+YZ5lyB5T17JuRvMUD2DgSKd9lVBha81DT8YBFrdtoPvP0j28jZ0gxG4flSg3URpTYbulWXqNZcfw34= X-Received: by 2002:ab0:2e8e:: with SMTP id f14mr11383060uaa.22.1607438472264; Tue, 08 Dec 2020 06:41:12 -0800 (PST) In-Reply-To: <87360gjs15.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=dov.grobgeld@gmail.com; helo=mail-ua1-x929.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.23 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" Xref: news.gmane.io gmane.emacs.devel:260556 Archived-At: --0000000000002340ea05b5f4efe9 Content-Type: text/plain; charset="UTF-8" Images indeed scale down, but they don't scale up to fill the available space. But as I mentioned, when loading svg's you have two independent steps. The first step is the rasterization where you turn vector graphics into raster. There is a separate step of how you scale the resulting raster image. It makes sense that the second step is identical whether the source is an svg or png, but my claim is that the first step should be influenced by the desktop dpi. I'll open a bug about it as Stefan suggested. Regards, On Tue, Dec 8, 2020 at 4:23 PM Lars Ingebrigtsen wrote: > Stefan Monnier writes: > > >> What is the resolution used when rasterizing svg files when loading them > >> into image-mode? I have a hdpi monitor, but the desktop dpi seems to be > >> ignored when loading an svg image, and therefore the raster image is too > >> smal. Is there anyway of manually overriding the dpi setting used? Note > >> that this is not the same as scaling the rasterized image. > > > > Please report this as a bug: the end user shouldn't have to do > > that manually. > > `create-image' should scale the image automatically, whether it's svg or > not (if `image-scaling-factor' is `auto'). > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --0000000000002340ea05b5f4efe9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Images indeed scale down, but they don't scale up t= o fill the available space.

But as I mentioned, when l= oading svg's you have two independent steps. The first step is the rast= erization where you turn vector graphics into raster. There is a separate s= tep of how you scale the resulting raster image. It makes sense that the se= cond step is identical whether the source is an svg or png, but my claim is= that the first step should be influenced by the desktop dpi.

<= /div>
I'll open a bug about it as Stefan suggested.

Regards,




On Tue, Dec 8, 2= 020 at 4:23 PM Lars Ingebrigtsen <lars= i@gnus.org> wrote:
Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> What is the resolution used when rasterizing svg files when loadin= g them
>> into image-mode? I have a hdpi monitor, but the desktop dpi seems = to be
>> ignored when loading an svg image, and therefore the raster image = is too
>> smal. Is there anyway of manually overriding the dpi setting used?= Note
>> that this is not the same as scaling the rasterized image.
>
> Please report this as a bug: the end user shouldn't have to do
> that manually.

`create-image' should scale the image automatically, whether it's s= vg or
not (if `image-scaling-factor' is `auto').

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--0000000000002340ea05b5f4efe9--