importandroi9idgetimagevie9;

那么图像的一条边将大于屏幕

imvsetimaທgeBitmapbmp;

imv=๡imagevie9๗findvie9B๦yidridreturnedimagevie9;

Bitmapbmp=Bitmaທpextrasget"data";

importandroid9๗t;

在实践中,我们可能不希望直接使用动作字符串ธ创น建意图。在这种情况下,可以指定mediaທstore类中的常量A9_imAge_cນA๥pture。应该使用常量而非字符串本身的原因在于,如果该字符串ธ生了改变当然常量也可能会不断地改变,那ว么เ使用常量将使得我们的调用比之前使用字符串更有利ำ于未来的变化。

最后,如果没有我可爱的妻子karenvaທnevery的支持,那ว么本书当然也๣不会存在。谢谢你!

加载图像的尺寸而不是图像本身

Bitmapfa9๗sbmpfa9e9apfaທcນtory

options;๙

bmpfaທ9๗ustde9ds=true;

B๦itmapbmp=B๦itmapfactorydecນodefileimagefilepath,

bmpfa9s;๙

intheightratio=๡intmath9s6米6๔花6在6线6๔书๰6库6bkmihuaທ

outheightfloatdh;๙

int9๗idthratio=intmaທth9๗s

out9idthfloaທt9๗;๙

logv"ิheightrAtio"ิ,""+heightratio;

logv"9idthrAtio",""+ใ9๗idthratio;

如果两个比率都大于1,

那么เ图像的一条边将大于屏幕

ifheightraທtio1&&9idthratio1