nanchen2251 / CompressHelper

:fire: 压缩文件,压缩图片,压缩Bitmap,Compress, CompressImage, CompressFile, CompressBitmap:https://github.com/nanchen2251/AiYaCompressHelper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

width and height must be > 0

misparking opened this issue · comments

复现环境:华为荣耀10,系统为8.1.0;
复现场景:调取相机拍照后,点击“√ ”(确认)后出现以下异常:

java.lang.IllegalArgumentException: width and height must be > 0
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1209)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1176)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1126)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:1087)
	at com.nanchen.compresshelper.ImageUtil.getScaledBitmap(ImageUtil.java:131)
	at com.nanchen.compresshelper.ImageUtil.compressImage(ImageUtil.java:177)