All Projects → shaohui10086 → Advancedluban

shaohui10086 / Advancedluban

Licence: apache-2.0
An Advanced Compress Image Library for Android / 高效、简洁的图片压缩工具库

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Advancedluban

Compress Images
Minify size your images. Image compression with extension: jpg/jpeg, svg, png, gif. NodeJs
Stars: ✭ 331 (-74.22%)
Mutual labels:  image-compression
Cloudinary npm
Cloudinary NPM for node.js integration
Stars: ✭ 450 (-64.95%)
Mutual labels:  image-compression
Image Actions
A Github Action that automatically compresses JPEGs, PNGs and WebPs in Pull Requests.
Stars: ✭ 844 (-34.27%)
Mutual labels:  image-compression
Flif
Free Lossless Image Format
Stars: ✭ 3,668 (+185.67%)
Mutual labels:  image-compression
Resizer
An image resizing library for Android
Stars: ✭ 406 (-68.38%)
Mutual labels:  image-compression
Optimizt
CLI image optimization tool
Stars: ✭ 594 (-53.74%)
Mutual labels:  image-compression
Tinypng4mac
TinyPNG client for Mac
Stars: ✭ 3,025 (+135.59%)
Mutual labels:  image-compression
Compression
Learned image compression
Stars: ✭ 79 (-93.85%)
Mutual labels:  image-compression
Generative Compression
TensorFlow Implementation of Generative Adversarial Networks for Extreme Learned Image Compression
Stars: ✭ 428 (-66.67%)
Mutual labels:  image-compression
Imgp
📸 High-performance cli batch image resizer and rotator
Stars: ✭ 744 (-42.06%)
Mutual labels:  image-compression
Wximagecompress
Image size quality compression, very close to WeChat picture compression strategy
Stars: ✭ 376 (-70.72%)
Mutual labels:  image-compression
Avif.js
AVIF polyfill for the browser
Stars: ✭ 399 (-68.93%)
Mutual labels:  image-compression
Caesium Image Compressor
Caesium is a cross-platform image compression software aimed at helping photographers, bloggers, webmasters, businesses or casual users at storing, sending and sharing digital pictures. Based on libcaesium.
Stars: ✭ 595 (-53.66%)
Mutual labels:  image-compression
Imageflow
High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
Stars: ✭ 3,643 (+183.72%)
Mutual labels:  image-compression
Compression Tools
A Docker image that contains a set of tools for compressing and optimize images in many formats with high results, it also includes GNU Parallel
Stars: ✭ 15 (-98.83%)
Mutual labels:  image-compression
Crunch
Crunch is a tool for lossy PNG image file optimization. It combines selective bit depth, color type, and color palette reduction with zopfli DEFLATE compression algorithm encoding using the pngquant and zopflipng PNG optimization tools. This approach leads to a significant file size gain relative to lossless approaches at the expense of a relatively modest decrease in image quality (see example images below).
Stars: ✭ 3,074 (+139.41%)
Mutual labels:  image-compression
Gaussianblur
An easy and fast library to apply gaussian blur filter on any images. 🎩
Stars: ✭ 473 (-63.16%)
Mutual labels:  image-compression
Bamboo
A cross-platform TinyPNG client 🌱🎍
Stars: ✭ 80 (-93.77%)
Mutual labels:  image-compression
Image Resizer
On-the-fly image resizing using Node.js and libvips. Heroku Ready!
Stars: ✭ 59 (-95.4%)
Mutual labels:  image-compression
Imgbot
An Azure Function solution to crawl through all of your image files in GitHub and losslessly compress them. This will make the file size go down, but leave the dimensions and quality untouched. Once it's done, ImgBot will open a pull request for you to review and merge. [email protected]
Stars: ✭ 732 (-42.99%)
Mutual labels:  image-compression

AdvancedLuban

build license

中文版

sketch

AdvancedLuban —— Is a convenient simple Android image compression tool library.Provides multiple compression strategies.Different calling methods,Custom compression,Multi-Image synchronous compression and so on,Focus on a better picture compression experience

Image Count Origin Total size Compressed Total size Time Cost
1 4.3Mb 85Kb 0.23s
4 14.22Mb 364Kb 1.38s
9 36.23Mb 745Kb 4.43s

Import

Maven

<dependency>
  <groupId>me.shaohui.advancedluban</groupId>
  <artifactId>library</artifactId>
  <version>1.3.5</version>
  <type>pom</type>
</dependency>

or Gradle

compile 'me.shaohui.advancedluban:library:1.3.5'

Usage

Listener mode

Advanced Luban internalComputation thread for image compression, external calls simply set the Listener can be:

Luban.compress(context, file)
    .putGear(Luban.THIRD_GEAR)      // set the compress mode, default is : THIRD_GEAR
    .launch(listener);              // start compression and set the listener

RxJava mode

RxJava call the same defaultComputation thread to compress, you can also define any thread, can be observed in any thread:

Luban.compress(context, file)                          
        .putGear(Luban.CUSTOM_GEAR)                 
        .asObservable()                             // generate Observable
        .subscribe(successAction, errorAction)      // subscribe the compress result

Compression mode

1. CUSTOM_GEAR

compress image file according to the restrictions you set, you can limit: the width, height or file size of the image file

    Luban.compress(context, file)
            .setMaxSize(500)                // limit the final image size(unit:Kb)
            .setMaxHeight(1920)             // limit image height
            .setMaxWidth(1080)              // limit image width
            .putGear(Luban.CUSTOM_GEAR)     // use CUSTOM GEAR compression mode
            .asObservable()

2. THIRD_GEAR

Using custom algorithms, according to the picture aspect ratio, the picture is compressed quickly, the resulting image size is about 100Kb, for general compression, no file size limit and picture width limit

3. FIRST_GEAR

The simplified version of THIRD GEAR, the compressed image resolution is less than 1280 x 720, the final file is less than 60Kb. suitable for fast compression, regardless of the final picture quality

Multi-Image synchronous compression

If you choose to call the way Listener:

    Luban.get(this)
            .putGear(Luban.CUSTOM_GEAR)             
            .load(fileList)                     // load all images
            .launch(multiCompressListener);     // passing an OnMultiCompress Listener

or the RxJava way to use:

    Luban.get(this)
            .putGear(Luban.CUSTOM_GEAR)             
            .load(fileList)                     // load all images
            .asListObservable()                 // Generates Observable <List<File>. Returns the result of all the images compressed successfully

About OOM

If you use a multi-map compression, we must take into account the risk of OOM, recommend you use CUSTOM_GEAR, and then customize the compression index, to a large extent reduce the risk of OOM, the current test did not find the problem of OOM

ChangeLog

1.3.5

  • Add custom compression cache directory

1.3.4

  • update RxJava to RxJava2

1.3.3

  • Set the default observed in the main thread

1.3.2

  • Optimize memory usage

1.3.1

  • Added custom compression format
  • COMO_GEAR used to solve the problem of OOM
  • Refactored most of the code
  • To support WebP, the minimum supported version is increased to 14

Issue

You can according to your needs to choose a different compression mode and call mode ! b( ̄▽ ̄)d !Finally, I welcome the Issue

Thanks For

License

Copyright 2016 shaohui10086

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].