# 이미지 다운로드(requests)
[pastacode lang=”markup” manual=”with%20open(C%3A%5CUsers%5Cjoo%5CPycharmProjects%5Cagriis%5Cfile.jpg’%2C%20’wb’)%20as%20f%3A%0A%20%20%20%20f.write(requests.get(img%2C%20verify%3DFalse).content)%0A%0A” message=”” highlight=”” provider=”manual”/]
# 이미지를 클립보드 저장
[pastacode lang=”markup” manual=”from%20io%20import%20BytesIO%0Aimport%20win32clipboard%0Afrom%20PIL%20import%20Image%0A%0Adef%20send_to_clipboard(clip_type%2C%20data)%3A%0A%09win32clipboard.OpenClipboard()%0A%09win32clipboard.EmptyClipboard()%0A%09win32clipboard.SetClipboardData(clip_type%2C%20data)%0A%09win32clipboard.CloseClipboard()%0A%0Afilefath%20%3D%201.jpg%0Aimage%20%3D%20Image.open(filefath)%0Aoutput%20%3D%20BytesIO()%0Aimage.convert(%22RGB%22).save(output%2C%20%22BMP%22)%0Adata%20%3D%20output.getvalue()%5B14%3A%5D%0Aoutput.close()%0A%0Asend_to_clipboard(win32clipboard.CF_DIB%2C%20data)” message=”” highlight=”” provider=”manual”/]
# 폴더에 저장된 이미지 삭제
[pastacode lang=”markup” manual=”os.remove(1.jpg)” message=”” highlight=”” provider=”manual”/]