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.
視覚化したいデータがいくつかあります。ソースデータの各バイトは、画像のピクセル値にほぼ対応しています。
Pythonを使用して画像ファイル(ビットマップ)を生成する最も簡単な方法は何ですか?
Pillowを使用して、ピクセル値のリストを含む画像を作成できます。
from PIL import Image img = Image.new('RGB', (width, height)) img.putdata(my_list) img.save('image.png')
PILとpyGameをご覧ください。どちらも、キャンバスに描画してファイルに保存することができます。