简体   繁体   中英

Issue using Python PIL/pillow to resize image

I have read a data array into pillow via the Image.fromarray method. While I am able to bring it into pillow and successfully paste it onto another image in memory, img.resize((1920,1080)) and img,thumbnail((1920, 1080)) have no effect (and no error).

That's because this operations create copies affected by the corresponding transformation. Have you tried img = img.resize((1920, 1080)) ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM