2013-04-05 146 views

回答

2

用你的数学底子

这将有助于

enter image description here

1

像这样:

sx = original_width/destination_width 
sy = original_height/destination_height 
if sx*original_height > destination_height: 
    s = sy 
else: 
    s = sx 
new_width = original_width*s 
new_height = original_height*s 
相关问题