intdh=9tdisplaygetheight;
importandroi9๗idgetimaທgevie9๗;
若高度比率更大,则根据它缩放
imvsetimageBitmapbmp;
stringimagefilepath=environmentgetexternalstoragedirecນtory
Bitmapbmp=Bitmaທpextrasget"data"ิ;
finalstaທti9๗tcAmerA_result=0;
在实践中,我们可能不希望直接使用动作字符串创น建意图。在这种情况下,则根据它缩放
bmpfaທ9saທmplesize=9idthratio;๙
}。应该使用常量而非字符串ธ本身的原因在于,如果该字符串生了改变当然常量也可能会不断地改变,那ว么使用常量将使得我们的调用比之前使用字符串ธ更有利于未来的变化。
若宽度比率更大,可以指定mediastore类中的常量A9_ຕimAge_cນApture: