Coder Social home page Coder Social logo

pic2webp's Introduction

将图片批量转换为webp格式

introduction

近3年来拍的照片多达 10GB,而我 mac 的闪存空间有限,经常提示我空间不足!最近做直播用到了 Webp 图片格式,可以节省空间,所以想把我的图片转为 Webp 格式,以此来节省宝贵的空间,convert 脚本就诞生了...

useage

进入到脚本所在目录

  • cd pic2web

执行转换脚本,将把pics文件夹里的图片转为webp格式;

  • sh convert.sh

执行转换脚本,将把 inputpath 文件(夹里的图片)转为webp格式;

  • sh convert.sh inputpath

控制台将会输出转换失败的图片路径。。。

feture

  • 支持单个文件转换
  • 支持批量转换,只需放入一个文件内即可
  • 支持文件夹递归
  • 支持保留原图片的创建和修改时间

preview

如何在 mac 上预览?

众所周知,mac 上的空格键被称之为万能键,几乎所有文档都可以快速预览,很遗憾苹果还没支持 Webp,所有我就找了一个 quicklook 的插件来解决,我的仓库里已经包含了我编译好的插件,可以直接拿来用,也可以去下载 Dmitry Chestnykh 的源代码自行编译生成 WebP.qlgenerator 文件,将她拖到 ~/Library/QuickLook 文件夹里就好了;

使用该插件预览时图片偏白,日后我会优化下;

极客也可以使用 vwebp 预览哦,使用 OPGL 绘制的,我还没看懂o(╯□╰)o

todo

  • webp 转为 PNG;也许你觉得webp不是主流,预览、修改不方便,想转回来;
  • 开发一款 mac App 能够双击预览而不是使用 Chrome 浏览器打开;
  • 优化 quicklook 插件;

pic2webp's People

Contributors

debugly avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zoranli

pic2webp's Issues

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.