Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
画像のアップロードを処理する Web サイトで作業しているため、有効な画像を確認する必要があります。PIL(Pillow) または imghdr モジュールを使用する 2 つのオプションがあります。
私の質問は、どちらを使用すればよいですか? PIL は管理されていないため、imghdr モジュールで機能しますか? それらのどれが安全かつ/または効率的ですか?
ありがとう。