<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fspace</author_name>
  <author_url>https://blog.hatena.ne.jp/fspace/</author_url>
  <blog_title>エフアンダーバー</blog_title>
  <blog_url>https://www.f-sp.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>Electronでsvg要素を画像として保存したいと思い、Canvasに変換してからPNGとして保存しようと試みた結果、失敗したという話。 最終的に諦めたのでこの記事に解決策は書いてありません。 同じことをしたい人が時間を無駄にしないための記事です。 drawImageによる変換 svg要素はシリアライズしてからBlobURLに変換するとImageのソースとすることができ、 ImageはdrawImageメソッドによりCanvasに描画できます。 const serializer = new XMLSerializer(); const data = serializer.serializeT…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.f-sp.com%2Fentry%2F2017%2F10%2F23%2F221741&quot; title=&quot;SVGをCanvasに変換しようとして失敗した話 - エフアンダーバー&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/f/fspace/20171023/20171023183142.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-10-23 22:17:41</published>
  <title>SVGをCanvasに変換しようとして失敗した話</title>
  <type>rich</type>
  <url>https://www.f-sp.com/entry/2017/10/23/221741</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
