support preserveRatio. update #223