Python PIL调整大小是否保持宽高比? [英] Does Python PIL resize maintain the aspect ratio?
本文介绍了Python PIL调整大小是否保持宽高比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PIL是否可以调整为我给的确切尺寸?还是如果我给它类似Image.ANTIALIAS
参数的东西,它会尝试保持宽高比吗?
Does PIL resize to the exact dimensions I give it no matter what? Or will it try to keep the aspect ratio if I give it something like the Image.ANTIALIAS
argument?
推荐答案
PIL中的Image.resize将完全按照说明进行操作.没有幕后长宽比的东西.
Image.resize from PIL will do exactly as told. No behind scenes aspect ratio stuff.
这篇关于Python PIL调整大小是否保持宽高比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文