• Stars
    star
    108
  • Rank 319,488 (Top 7 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Converter PNG/JPG to Webp and scan all changes

Webp Converter and Analytics

An powerful webp batch converter and differ analytics tool.

You can use this tool to converter batch images(png/jpg) to webp and output size changes.

Purpose

  1. Convert batch images from PNG/JPG format to Webp format
  2. WILL NOT convert images if its webp one is larger than origin one automatically(the origin one will be copied to [output-directory]/origin/ directory)
  3. WILL NOT convert images if it is failed to convert to webp one automatically(the origin image of failed one will be copied to [output-directory]/failed directory)
  4. You can ignore all images which has transparency pixel if you want with --ignore-transparency-image config(the origin image of has-transparency-image will be copied to /webp-converted/transparency directory)
  5. Output convert result, like how much size reduces, how many files skip convert, etc...
  6. You can replace the images with converted-webp image automatically if you want with replace: true config

Install

brew install webp
pip install webp-converter

Use

Example

If you just want to convert all images on the current files when it can be smaller after converted and replace the origin one:

webpc --r

If you just want to convert all images on the current folder and with quality-ratio to 70 and output to ~/Downloads/test-converted when it can be smaller after converted:

webpc -q=70 -o=~/Downloads/test-converted/

If you just want to convert all images on the current folder and with clean the webp-converted folder if it exist and with quality-ratio to 95 and output to ./webp-converted and ignore images when it has transparency on it when it can be smaller after converted:

webpc --c --ignore-transparency-image -q=95

If you want to convert ignore filename contain the sepcial word, you can use --ignore-filename-match, the following demo is skip convert all files which name contains '.9':

webpc --r --ignore-filename-match='.9'

If you want to convert all images on ~/Downloads/img/test folder and output converted result to ~/Downloads/test-converted folder and only converted origin images when it isn't has same name .webp file on ~/Downloads/test-converted folder(just not with --c argument) when it can be smaller after converted:

webpc -o=~/Downloads/test-converted/ ~/Downloads/img/test

My Terminal Config

If you want to adapter the same theme like screenshot above, it's very easy:

  • Firstly, please use powerlevel9k theme(Install the Powerlevel9k Theme and Powerline Fonts as the powerlevel9k repo readme doc said).
  • Secondly, please config the iTerm2-Neutron color scheme.
  • Thirdly, please config your shell(If you are using zsh, just add following code to the ~/.zshrc file):
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time)
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S}"
POWERLEVEL9K_NODE_VERSION_BACKGROUND='022'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2

License

Copyright 2017, JacksGong(https://jacksgong.com)
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.

More Repositories

1

JKeyboardPanelSwitch

For resolve the layout conflict when keybord & panel are switching (Android键盘面板冲突 布局闪动处理方案)
Java
4,182
star
2

okcat

The powerful log analysis, you can use it to parse any log.
Python
203
star
3

filedownloader-okhttp3-connection

The FileDownloadConnection implemented with the okhttp3
Java
117
star
4

ThreadDebugger

Threads monitor and the thread pool factory.
Java
85
star
5

grpc-android-kotlin

Simple grpc Server/Android written in kotlin, protobuf generated java files
Kotlin
50
star
6

android-project-combine

combine multiple android gradle projects on one Android Studio window.
Python
32
star
7

Android_CACHE_MANAGER

Android文件&缓存管理
29
star
8

MessageHandler

Simple Handler forwarding, for supporting pause、resume、cancelAllMessage、killSelf skills.
Java
28
star
9

wuhan-2019-nCoV

武汉2019nCov信息爬虫
Python
23
star
10

crash-pvp

To Crash the King of Glory(王者荣耀) when you launch it
Java
22
star
11

Blog

知识, 学习、沉淀与分享
Stylus
20
star
12

gralde-sample

Some demonstrate for gradle.
Java
17
star
13

PercentSmoothHandler

Handle the case of the internal of the percent between the current and the last is too large to smooth for the target progress widget or event others
Java
17
star
14

Magnifier_Word

长按英语单词放大镜取词,取到单词后toast结果。
Java
16
star
15

wechat-backup-merge

Merge and migrate Wechat backup files to another folder
Python
15
star
16

wechat-hunter

the hunter for wechat based on Xposed
Java
12
star
17

notification-adapter

The adapter for notification, what is used for adapter various system styles on notification
Java
7
star
18

COCOS2D-X_LINKGAME

基于Cocos2d-x连连看游戏
C++
7
star
19

SOCKET_HANLE

Android有关Socket逻辑处理(心跳、断线重连、发送、接收、alarm省点处理).
5
star
20

AIDL_COMMUNICATE-CALLBACK

AIDL_COMMUNICATE-CALLBACK
Java
5
star
21

Android-Touch-Gallery

Android touch gallery with net、local file or cache.
Java
2
star
22

FlatBuffer-Optimize

flatbuffer optimize
Python
2
star
23

Android_Poll

自实现轮询&消息管理
1
star
24

workflows-proxy

switch Tencent proxy and Home Proxy
Python
1
star
25

server-maintain

自动化生成各类Ubuntu下的站点环境的Bash脚本
Shell
1
star
26

Android-Database-Construct

Android Database Construct
Java
1
star