/**
* 获取图片文件的宽高,宽高封装在Point的X和Y中
*
* @param filePath 文件路径
*/
public static Point getPicWH(String filePath) {
Point point = new Point();
try {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
Bitmap bmp = BitmapFactory.decodeFile(filePath, options);
point.x = options.outWidth;
point.y = options.outHeight;
options.inJustDecodeBounds = false;
} catch (Exception e) {
e.printStackTrace();
}
return point;
}
FileUtil.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:exciting-app
作者:
评论列表
文章目录