ボールドテキストpythonのtkinterを使って、拡張子pngの画像の読み込みが出来ません。
環境はMacOSのJupyter Notebookなのですが、テキストではWindowsのVisual Studio Codeを使う前提です。
テキストの画像をデスクトップに保存しているのですが、Macでのパスの問題でしょうか?
images = [tkinter.PhotoImage(file="/Users/○○/Desktop/12saipython/img6/chap6-mapfield.png")]
と入力実行すると、次のエラーメッセージが出ました。
TclError: couldn't recognize data in image file "/Users/○○/Desktop/12saipython/img6/chap6-mapfield.png"
回答1件
あなたの回答
tips
プレビュー