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

drawable下的图片没有转成webp #72

Closed
liuqingdada opened this issue Jul 1, 2021 · 1 comment
Closed

drawable下的图片没有转成webp #72

liuqingdada opened this issue Jul 1, 2021 · 1 comment

Comments

@liuqingdada
Copy link

配置如下
apply plugin: 'McImage'
McImageConfig {
// 是否检测图片大小,默认为true
isCheckSize false
// 优化类型,可选"ConvertWebp","Compress",转换为webp或原图压缩,默认Compress,
// 使用ConvertWep需要min sdk >= 18.但是压缩效果更好
optimizeType "ConvertWebp"
// debug下是否可用,default true
enableWhenDebug false
// 是否检测大像素图片,default true
isCheckPixels false
mctoolsDir "$rootDir"
// 是否支持带有透明度的webp,default false, 带有透明图的图片会进行压缩
isSupportAlphaWebp true
mctoolsDir "$rootDir"
}

并且没有输出 do not convert webp because the size become larger 这行log

@owenlongbo
Copy link
Owner

因为转换会更大,webp算法不能保证百分之百转换后会更小,因图片而不一样,所以没转换。log 的中文意思一致

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

2 participants