Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isCheckPixels 导致IIOException #83

Closed
wisdomcai opened this issue Jan 5, 2022 · 3 comments
Closed

isCheckPixels 导致IIOException #83

wisdomcai opened this issue Jan 5, 2022 · 3 comments

Comments

@wisdomcai
Copy link

Windows上使用as,在编译release包的时候出现Execution failed for task ':app:McImageHyRelease'.

javax.imageio.IIOException: Caught exception during read:

配置如下:
McImageConfig {
isCheckSize false //是否检测图片大小,默认为true
optimizeType "Compress" //优化类型,可选"ConvertWebp","Compress",转换为webp或原图压缩,默认Compress,使用ConvertWep需要min sdk >= 18.但是压缩效果更好
maxSize 310241024 //大图片阈值,default 1MB
enableWhenDebug false //debug下是否可用,default true
isCheckPixels true// 是否检测大像素图片,default true
maxWidth 2000 //default 1000 如果开启图片宽高检查,默认的最大宽度
maxHeight 2000 //default 1000 如果开启图片宽高检查,默认的最大高度
whiteList = [ //默认为空,如果添加,对图片不进行任何处理
"icon_launcher.png"
]
mctoolsDir "$rootDir"
isSupportAlphaWebp false //是否支持带有透明度的webp,default false,带有透明图的图片会进行压缩
multiThread false //是否开启多线程处理图片,default true
bigImageWhiteList = ["exo_ic_default_album_image.png"] //默认为空,如果添加,大图检测将跳过这些图片
}

isCheckPixels true改成isCheckPixels false之后就可以了,不涉及到安全路径,不明白为什么

@zxhandroid
Copy link

我也遇到了这个问题,应该是源码中的 ImageUtil.isBigPixelImage(file, mcImageConfig.maxWidth, mcImageConfig.maxHeight) 抛出了异常,跟进去却没发现有相应的 Caught exception during read 信息

@wisdomcai
Copy link
Author

你有什么解决办法吗?MAC上面使用是OK的

@opLW
Copy link

opLW commented Mar 14, 2022

我也遇到了,isCheckPixels设置为false就行了,相当于暂时不用像素检查这个功能了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants