unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Joe Corneli <joseph.corneli.em@hyperreal.enterprises>,
	emacs-devel@gnu.org
Subject: Re: SVG with embedded png
Date: Tue, 18 May 2021 13:54:47 +0100	[thread overview]
Message-ID: <8735uknqw8.fsf@tcd.ie> (raw)
In-Reply-To: 83eee4rzxs.fsf@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Tue, 18 May 2021 11:45:08 +0100
>> From:  Joe Corneli via "Emacs development discussions." <emacs-devel@gnu.org>
>> 
>> Hello, the attached SVG file was made with M-x org-latex-preview.  It
>> includes an embedded PNG file.
>> 
>> The source is this LaTeX-in-Org oneliner, together with the PNG.
>> 
>> $$\mathit{Hello} \includegraphics[width=2cm,natwidth=445,natheight=661]{/home/joe/tools_for_thought/Tft1st.png}$$
>> 
>> The generated SVG image displays correctly in Mozilla Firefox 88.0.1.
>
> FWIW, I don't see the embedded PNG in Firefox, either.  Not even in
> the latest version 88 of Firefox.

Have you installed the PNG file in the location expected by the SVG
file?  Alternatively, you can adjust the embedded file name in the SVG
file.

For example, I saved the two files as /tmp/foo.svg and /tmp/foo.png and
edited the xlink:href attribute in /tmp/foo.svg to point to
/tmp/foo.png (a relative file name also works).

The result renders fine in Emacs 25 and 26 (w/ ImageMagick), Emacs 27
and 28 (w/ Cairo and w/o ImageMagick), as well as Firefox 86.0.1, with
the system librsvg 2.50.3:


[-- Attachment #2: 2021-05-18-135047_1920x1080_scrot-fs8.png --]
[-- Type: image/png, Size: 46162 bytes --]

[-- Attachment #3: Type: text/plain, Size: 65 bytes --]


So maybe the issue is in locating the embedded file?

-- 
Basil

  parent reply	other threads:[~2021-05-18 12:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 10:45 SVG with embedded png Joe Corneli via Emacs development discussions.
2021-05-18 12:25 ` Eli Zaretskii
2021-05-18 12:50   ` tomas
2021-05-18 12:54   ` Basil L. Contovounesios [this message]
2021-05-18 12:40 ` Joost Kremers
2021-05-18 14:24   ` Joe Corneli via Emacs development discussions.
2021-05-18 18:05     ` Alan Third
2021-05-18 18:09       ` Alan Third
2021-05-19 12:57       ` Joe Corneli via Emacs development discussions.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735uknqw8.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joseph.corneli.em@hyperreal.enterprises \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).