From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Loading svg from memory using custom filename for base_uri Date: Sat, 23 Feb 2019 01:01:02 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b43e17058282ba4b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83518"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 22 23:01:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxIsn-000LcF-Gh for ged-emacs-devel@m.gmane.org; Fri, 22 Feb 2019 23:01:25 +0100 Original-Received: from localhost ([127.0.0.1]:57537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxIsm-0005Pj-HY for ged-emacs-devel@m.gmane.org; Fri, 22 Feb 2019 17:01:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxIsf-0005Oj-TV for emacs-devel@gnu.org; Fri, 22 Feb 2019 17:01:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxIsd-0002DO-U0 for emacs-devel@gnu.org; Fri, 22 Feb 2019 17:01:17 -0500 Original-Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:34227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxIsd-0002B8-I3 for emacs-devel@gnu.org; Fri, 22 Feb 2019 17:01:15 -0500 Original-Received: by mail-lj1-x235.google.com with SMTP id l5so2881328lje.1 for ; Fri, 22 Feb 2019 14:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=D/lXXYffywQH5Ruqz1usNn2CF/jYXPuGY8RKZg9AVW0=; b=HVdkRwKIadjuTJ6HaJSX/bDuK6QP9rJ93eWF+Uu4buwvmMFqRZQ5pCOto1AowAjgtk PhCNDvrCkZdt8Xk18/0A4ayDXmR54WBEOLZskXd/4NXXIN/TzoMYpN1pozZ9avXvcaTl cgj8cBv2kzLjDfeAOgCkkFQINmON/uc37dfbt690STFF2At4DJP5S15WoKcaidprvlRi Wl6VgprV/3QsT5GkXV0SyEVwaJ4bDi4pVtPzcBSUf2/T32PQdaNzP6Qc7YJW9mIsqZH6 ED4JSKbhQ00o98Y5/zt1cOTtl1D0D5QvdwqjnUcM+YJ1fxsruqLbUaeEPUrQUD/955Cs kpwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=D/lXXYffywQH5Ruqz1usNn2CF/jYXPuGY8RKZg9AVW0=; b=AdWzGjicyXa9XxqpM8wrk8qR9MY1w1Te/LaXk4r3fWRta4A5s2na2OlFf0rFYUdkYs Hb7YLfI2q55GpqExmHRA+1s1MMc8JkO16OZxaQ5pP7PL2UDcePorcE+s8gI745IejakU douHTFRB2AT3KtwDtjdogmyP0FQiZJfiLs2jXd97MSzxT8MKMGV/RtP3rpTl+DBFlo+Z Hq2r7bqoiuxvSlScL7ILN0g4IXSY4/Qe4YE5GrRgw6RkiN/pOMdNfxnp3DGojOiK3/aB q26D2Crj7+PuDrcOF0YBuHs8HbDfqa2FGBz2HLEpiKSjC8PTgAGgi6S4S2dIiOWecRRs 1whA== X-Gm-Message-State: AHQUAub8TSw4oAJdDEwnKj22x5kyQCOptNC9whShhmTae978FZILYnUm MetpW9DdWIj18fdgNyEIqOVpi0kH4HbesSXYVELbD/2v X-Google-Smtp-Source: AHgI3IZiiXk6z1+Wgiz9hNh3jMnfTxfLZF8MdV2nLqwyc+AHIpVjEREMJXBaDmE27vIHuYOIzcYTkdq6k0bW/xWfNTU= X-Received: by 2002:a2e:312:: with SMTP id 18mr3758171ljd.114.1550872873285; Fri, 22 Feb 2019 14:01:13 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::235 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:233534 Archived-At: --000000000000b43e17058282ba4b Content-Type: text/plain; charset="UTF-8" Currently, when SVG image is loaded with `svg_load` it first examines :file value and only if :file is missing it looks for :data, using current buffer's filename (if any) as base_uri Would not it be better to check for :data first and if present, then use :file as value for base_uri? Falling back to current buffer filename in case :file is missing Unfortunately embedding raster images into svg with base64 encoding, using `svg-embed` is slow. Thanks -- lg --000000000000b43e17058282ba4b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Currently, when SVG image is loaded with = `svg_load` it first examines :file value and only if :file is missing it lo= oks for :data, using current buffer's filename (if any) as base_uri
=

Would not it be better to check for := data first and if present, then use :file as value for base_uri?=C2=A0 Fall= ing back to current buffer filename in case :file is missing

Unfortunately embedding raster images into = svg with base64 encoding, using `svg-embed` is slow.

Thanks

--
lg
--000000000000b43e17058282ba4b--