webp格式处理库libwebp下载、安装及使用说明
原创 52cxy 01-14 10:51 阅读数:1116

本文介绍下libwebp库的下载、安装及基本的使用说明:


一、下载

    下载地址:https://developers.google.cn/speed/webp/download?hl=en


    将根据自己喜好的安装方式下载对应的文件,官方提供2种方式:


    1、预编译方式,此种方式下载后无需安装,解压后可直接使用,此种方式适用于新手;


    2、源码安装,这种方式先下载安装源码、然后自行编译安装,适用于高手; 


二、安装

    1、如果下载的预编译好的文件,下载完成后解压就在bin目录自带生成好的可执行文件;


    2、如果上一步选择的是源码方式,可参照官方安装文档:https://developers.google.cn/speed/webp/docs/compiling?hl=en

    

    3、通过yum安装方式安装(无需第一步)

yum -y install libwebp-devel libwebp-tools


三、使用说明


    libwebp库包含5大功能模块,分别介绍如下:


    1、cwebp -- WebP encoder tool,Compress an image file to a WebP file,即将一个图片文件压缩成Webp格式的文件;


    2、dwebp -- WebP decoder tool,Decompress a WebP file to an image file,即将一个Webp格式的文件解压成普通图片文件;


    3、vwebp -- WebP file viewer,Decompress a WebP file and display it in a window,即将一个Webp格式的文件解压并显示在一个窗口中; 


    4、webpmux -- WebP muxing tool,Create animated WebP files from non-animated WebP images, extract frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile,即从非动画 WebP 图像创建动画 WebP 文件,从动画 WebP 图像中提取帧,并管理 XMP/EXIF 元数据和 ICC 配置文件;


    5、gif2webp -- Tool for converting GIF images to WebP,Convert a GIF image to WebP,即将一个gif格式的文件压缩成Webp格式的文件; 

共0条评论
我要评论