All Projects → chenenyu → Img Optimizer Gradle Plugin

chenenyu / Img Optimizer Gradle Plugin

一款用于优化png图片的gradle插件,有效减少APK体积,支持极限压缩和无损压缩。

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Img Optimizer Gradle Plugin

Androidsvgdrawable Plugin
Gradle plugin that generates qualified, density specific PNG drawables from SVG files at build time for your Android projects.
Stars: ✭ 263 (-63.37%)
Mutual labels:  gradle-plugin, png
image-optimizer
Image optimization using PHP
Stars: ✭ 28 (-96.1%)
Mutual labels:  png, optimize
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (-25.91%)
Mutual labels:  gradle-plugin
Bbmetalimage
A high performance Swift library for GPU-accelerated image/video processing based on Metal.
Stars: ✭ 677 (-5.71%)
Mutual labels:  png
Scabbard
🗡 A tool to visualize Dagger 2 dependency graphs
Stars: ✭ 615 (-14.35%)
Mutual labels:  gradle-plugin
Gradle Git
Git plugin for Gradle
Stars: ✭ 559 (-22.14%)
Mutual labels:  gradle-plugin
Jsonschema2pojo
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Stars: ✭ 5,633 (+684.54%)
Mutual labels:  gradle-plugin
Can I Drop Jetifier
Gradle plugin that checks if there are dependencies using support library instead of AndroidX.
Stars: ✭ 520 (-27.58%)
Mutual labels:  gradle-plugin
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (-0.84%)
Mutual labels:  gradle-plugin
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+748.75%)
Mutual labels:  png
Shot
Gradle plugin developed to facilitate screenshot testing for Android
Stars: ✭ 668 (-6.96%)
Mutual labels:  gradle-plugin
Optimizt
CLI image optimization tool
Stars: ✭ 594 (-17.27%)
Mutual labels:  png
Gradle Task Tree
Gradle plugin that adds a 'taskTree' task that prints task dependency tree
Stars: ✭ 573 (-20.19%)
Mutual labels:  gradle-plugin
Thinrplugin
去除android中的R.class
Stars: ✭ 632 (-11.98%)
Mutual labels:  gradle-plugin
Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: ✭ 23,928 (+3232.59%)
Mutual labels:  png
Php Qrcode
A QR Code generator for PHP7.4+
Stars: ✭ 685 (-4.6%)
Mutual labels:  png
Multi Os Engine
Multi-OS Engine: Create iOS Apps in Java (or Kotlin ... etc.)
Stars: ✭ 529 (-26.32%)
Mutual labels:  gradle-plugin
Sdkhotfix
在用户规模千万级别的app中验证过,稳定无兼容问题,5分钟让你的SDK拥有热修复能力。A SDK hotfix library with stable verified in tens of millions of users can be accessed in only five minutes.
Stars: ✭ 585 (-18.52%)
Mutual labels:  gradle-plugin
Tf trt models
TensorFlow models accelerated with NVIDIA TensorRT
Stars: ✭ 621 (-13.51%)
Mutual labels:  optimize
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (-0.7%)
Mutual labels:  gradle-plugin

Download License Android Arsenal GitHub stars

中文版

img-optimizer-gradle-plugin

A gradle plugin for optimizing PNGs, effctively reducing APK size. Both extreme compression and lossless compression are available.

Available OS

Tested on macOSwindows10Ubuntu16.04LTS(amd64). If you have any questions, plz open issues.

How to use

Add the following Gradle configuration to your build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        ...
		classpath 'com.chenenyu:img-optimizer:latestVersion'
    }
}

Then in your moudle's build.gradle:

apply plugin: 'img-optimizer'

Now you can see the tasks in task tree:
Task
Double click to execute the task.

Configuration

You can add the following options to custom the task:

optimizerOptions {
    triggerSize 5
    type "lossy"
    suffix "_opt"
}
  1. triggerSize Used for filtering pictures. Picture whose size is less than this option will be ignored. Defaults to 0.
  2. type Now supports"lossy" and "lossless""lossy" means extreme compression(recommend, default, fast, effective),"lossless" means loseless compression(slow, inefficient)。
  3. suffix The suffix of the picture which has been optimized. If "_opt",the optimizer will generate a new picture orignal_opt.png for original.png. Defaults to null.

Preview

Original png Extreme compression(lossy) Loseless compression(lossless)
526K 195K(reduce 63%) 473K(reduce 10%)
原图 极限压缩 无损压缩

Note

If there are multiple modules in your project, please add the optimizer in where you want to execute optimization since each module is independent. The optimizer will generate log file in the root directory of current module.

Other libraries

SuperAdapter: Adapter(BaseAdapter, RecyclerView.Adapter) wrapper for Android.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].