<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>baba_s</author_name>
  <author_url>https://blog.hatena.ne.jp/baba_s/</author_url>
  <blog_title>コガネブログ</blog_title>
  <blog_url>https://baba-s.hatenablog.com/</blog_url>
  <categories>
    <anon>その他</anon>
    <anon>その他 - Python</anon>
  </categories>
  <description>ソースコード import glob from PIL import Image directory_path = &quot;【フォルダのパス】/**/*.png&quot; files = glob.glob(directory_path, recursive=True) for path in files: image = Image.open(path) image = image.convert(&quot;P&quot;) palette = image.getpalette() palette[255 * 3 + 0] = 255 palette[255 * 3 + 1] = 0 palette[255 * 3 + 2…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaba-s.hatenablog.com%2Fentry%2F2022%2F05%2F20%2F081100&quot; title=&quot;【Python】指定したフォルダ内のすべての .png のモードを RGB からインデックスに変更して背景色はピンクにするサンプル - コガネブログ&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/b/baba_s/20220520/20220520134125.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-05-20 08:11:00</published>
  <title>【Python】指定したフォルダ内のすべての .png のモードを RGB からインデックスに変更して背景色はピンクにするサンプル</title>
  <type>rich</type>
  <url>https://baba-s.hatenablog.com/entry/2022/05/20/081100</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
