๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ‘จ๐Ÿผ‍๐Ÿ’ป๊ฐœ๋ฐœ/PIL

PIL - ์ด๋ฏธ์ง€ ํšŒ์ „ ํ˜„์ƒ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

by Janger 2024. 4. 20.
728x90
๋ฐ˜์‘ํ˜•

 

์›์ธ ๋ฐ ํ•ด๊ฒฐ

 

EXIF์˜ ๋ฐฉํ–ฅ ํƒœ๊ทธ๊ฐ€ ์›์ธ, ํ•ด๊ฒฐ ๋ฐฉ์•ˆ์œผ๋กœ ImageOps.exif_transpose()๋กœ EXIF ๋ฐฉํ–ฅ ํƒœ๊ทธ ์ œ๊ฑฐ

 

 

from PIL import Image, ImageOps
im = Image.open("file.jpg")
im = ImageOps.exif_transpose(im)

 

 

https://stackoverflow.com/questions/4228530/pil-thumbnail-is-rotating-my-image

https://pillow.readthedocs.io/en/latest/reference/ImageOps.html#PIL.ImageOps.exif_transpose

https://yjs-program.tistory.com/272

https://github.com/python-pillow/Pillow/issues/4703#issuecomment-645219973

728x90
๋ฐ˜์‘ํ˜•