gpt4 book ai didi

xml - 在 Rss 或 Atom-feeds 中使用 data-uri 嵌入图像

转载 作者:行者123 更新时间:2023-12-03 21:34:15 25 4
gpt4 key购买 nike

我可能会问显而易见的问题,但是是否可以使用数据 URI 将图像嵌入到 RSS 或原子提要中?

(如果我将它们嵌入 hwo 以使提要阅读器理解?)

例子

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<image>
<url><![CDATA[data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==]]></url>
<title>Spain.info</title>
<width>48</width>
<height>48</height>
<link>https://en.wikipedia.org/wiki/Data_URI_scheme</link>
</image>
<title>Data URI scheme</title>
<atom:link href="https://en.wikipedia.org/wiki/Data_URI_scheme" rel="self" type="application/rss+xml" />
<link>https://en.wikipedia.org/wiki/Data_URI_scheme</link>
<description>Data URI scheme</description>
<lastBuildDate>Tue, 12 Jul 2016 19:49:39 +0000</lastBuildDate>
</channel>
</rss>

最佳答案

您建议的代码在 iPhone 播客中对我来说效果很好(尽管 5x5 图像显示非常大且模糊)。

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<image>
<url><![CDATA[data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==]]></url>
<title>Spain.info</title>
<width>48</width>
<height>48</height>
<link>https://en.wikipedia.org/wiki/Data_URI_scheme</link>
</image>
<title>Data URI scheme</title>
<atom:link href="https://en.wikipedia.org/wiki/Data_URI_scheme" rel="self" type="application/rss+xml" />
<link>https://en.wikipedia.org/wiki/Data_URI_scheme</link>
<description>Data URI scheme</description>
<lastBuildDate>Tue, 12 Jul 2016 19:49:39 +0000</lastBuildDate>
</channel>
<item>
<title>Black and White Rag - Winifred Atwell</title>
<description>Early rare stereo version by Winifred Atwell, used Lenco L85 turntable with Grace F9E cartridge.</description>
<link>https://archive.org/details/BlackAndWhiteRag-383</link>
<pubDate>03 May 2021 00:00</pubDate>
<enclosure url="https://ia800209.us.archive.org/7/items/BlackAndWhiteRag-383/BlackAndWhiteRagWinifredAtwell.mp3" type="audio/mpeg" />
</item>
</rss>```

关于xml - 在 Rss 或 Atom-feeds 中使用 data-uri 嵌入图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38338162/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com