android 根据分辨率对图像进行缩放

android 根据分辨率对图像进行缩放,第1张

概述原文链接:http://www.cnblogs.comracydj/archive/2011/11/02/2232635.htmlmDDpi=0xF0;mDpi=0xA0;if(mDDpi!=mDpi){ floatperc=(float)mDpi/(float)mDDpi; intwidth=(int)(org.getWidth()*perc); intheight=(int)(org.ge 原文链接:http://www.cnblogs.com/tracydj/archive/2011/11/02/2232635.html

mDDpi = 0xF0;
mDpi = 0xA0;

if (mDDpi != mDpi) {	float perc = (float) mDpi / (float) mDDpi;	int wIDth = (int) (org.getWIDth() * perc);	int height = (int) (org.getHeight() * perc);	org = Bitmap.createScaledBitmap(org, wIDth, height, true);}Drawable draw = new BitmapDrawable(getResources(), org);

  

转载于:https://www.cnblogs.com/tracydj/archive/2011/11/02/2232635.HTML

总结

以上是内存溢出为你收集整理的android 根据分辨率图像进行缩放全部内容,希望文章能够帮你解决android 根据分辨率对图像进行缩放所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1112546.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存