Coder Social home page Coder Social logo

Comments (3)

biginsect avatar biginsect commented on May 28, 2024

webp的本身就被压缩过了把

from mcimage.

biginsect avatar biginsect commented on May 28, 2024

请教下,这个插件是打包的时候将图片压缩处理的把,但我写了个demo处理发现没有进行处理,不确定是否是因为我的配置有问题。

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

mctools 我也下了放在了根目录下,log显示:
[Webp][E:\android demo\ImageOptimizationDemo\app\src\main\res\drawable-xxhdpi\home_ad_1.png][oldInfo: 115062][newInfo: 0]

from mcimage.

smallSohoSolo avatar smallSohoSolo commented on May 28, 2024

是个好想法,我补充一下,我找找webp压缩算法

from mcimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.