ZipFileの圧縮時に、io.Bytesで作成したデータを書き込めるのでしょうか?
一時ファイルを作成してからで無いと書き込めないでしょうか。
python
1 2from PIL import Image 3import io 4 5image_data = ... # byte values of the image 6image = io.BytesIO(image_data) 7 8with ZipFile('spam.zip', 'w') as myzip: 9 myzip.write('eggs.txt')
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/03/12 14:53