{"type":"rich","author_url":"https://blog.hatena.ne.jp/baba_s/","provider_url":"https://hatena.blog","published":"2022-05-20 08:05:00","width":"100%","categories":["\u305d\u306e\u4ed6","\u305d\u306e\u4ed6 - Python"],"title":"\u3010Python\u3011PNG \u306e\u30e2\u30fc\u30c9\u3092 RGB \u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u5909\u66f4\u3059\u308b\u30b5\u30f3\u30d7\u30eb","url":"https://baba-s.hatenablog.com/entry/2022/05/20/080500","description":"\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 from PIL import Image path = \"\u3010.png \u306e\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3011\" image = Image.open(path) print(image.mode) image = image.convert(\"P\") print(image.mode) image.save(path)","author_name":"baba_s","provider_name":"Hatena Blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20220520/20220520134125.png","blog_url":"https://baba-s.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaba-s.hatenablog.com%2Fentry%2F2022%2F05%2F20%2F080500\" title=\"\u3010Python\u3011PNG \u306e\u30e2\u30fc\u30c9\u3092 RGB \u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u5909\u66f4\u3059\u308b\u30b5\u30f3\u30d7\u30eb - \u30b3\u30ac\u30cd\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","height":"190","blog_title":"\u30b3\u30ac\u30cd\u30d6\u30ed\u30b0"}