반응형
    
    
    
  import io
img = Image.open('file_path', mode='r')
buffer = io.BytesIO()
img.save(buffer, format='PNG')
buffer.seek(0)
728x90
    
    
  반응형
    
    
    
  'Python' 카테고리의 다른 글
| [Python] 현재 날짜 포멧 출력하기 (0) | 2022.08.22 | 
|---|---|
| [Python] 실행시간 체크하기. decorator 사용하기 (0) | 2022.08.13 | 
| [Python] tensor 를 이미지로 저장하기 (0) | 2022.06.20 | 
| TypeError: Descriptors cannot not be created directly (protoc >= 3.19.0) 해결하기 (2) | 2022.06.20 | 
| [PyQT5] UI Designer QLabelEdit - password (0) | 2022.03.25 | 
 
										
									 
										
									 
										
									 
										
									
댓글