<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>o2mana</author_name>
  <author_url>https://blog.hatena.ne.jp/o2mana/</author_url>
  <blog_title>たぶんこれからもエンジニア</blog_title>
  <blog_url>https://o2mana.hatenadiary.org/</blog_url>
  <categories>
    <anon>GD2</anon>
    <anon>PHP</anon>
  </categories>
  <description>縦横比を固定で指定サイズのキャンバスに埋め込む時、四隅は黒で画像を中央に持ってくるをやってみた。 $path = 'test.jpg'; $frame_width = 75; $frame_height = 75; $info = getimagesize($path); $src_width = $info[0]; $src_height = $info[1]; $src_image = imagecreatefromjpeg($path); if($src_width &gt; $src_height){ $width = ($src_width &gt; $frame_width) ? $frame…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fo2mana.hatenadiary.org%2Fentry%2F20110520%2F1305860280&quot; title=&quot;画像を縦横比固定で指定サイズのキャンバスに埋め込む - たぶんこれからもエンジニア&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/o/o2mana/20061018/20061018215332.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-20 11:58:00</published>
  <title>画像を縦横比固定で指定サイズのキャンバスに埋め込む</title>
  <type>rich</type>
  <url>https://o2mana.hatenadiary.org/entry/20110520/1305860280</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
