当前位置:编程学习 > C/C++ >>

GIF转换成WEBP的方法和代码

GIF2WEBP

gif2webp - Convert a GIF image to WebP 

gif2webp[options] input_file.gif -o output_file.webp
 
DESCRIPTION

This manual page documents thegif2webpcommand.
gif2webp converts a GIF image to a WebP image. 

OPTIONS

The basic options are:
-o string
Specify the name of the output WebP file. If omitted, gif2webp willperform conversion but only report statistics.
-h, -help
Usage information.
-version
Print the version number (as major.minor.revision) and exit.
-lossy
Encode the image using lossy compression.
-q float
Specify the compression factor for RGB channels between 0 and 100. The defaultis 75.
In case of lossless compression (default), a 易做图all factor enables fastercompression speed, but produces a larger file. Maximum compression is achievedby using a value of 100.
In case of lossy compression (specified by the -lossy option), a 易做图all factorproduces a 易做图aller file with lower quality. Best quality is achieved by using avalue of 100.
-m int
Specify the compression method to use. This parameter controls thetrade off between encoding speed and the compressed file size and quality.Possible values range from 0 to 6. Default value is 4.When higher values are used, the encoder will spend more time inspectingadditional encoding possibilities and decide on the quality gain.Lower value can result is faster processing time at the expense oflarger file size and lower compression quality.
-f int
For lossy encoding only (specified by the -lossy option). Specify the strengthof the deblocking filter, between 0 (no filtering) and 100 (maximum filtering).A value of 0 will turn off any filtering. Higher value will increase thestrength of the filtering process applied after decoding the picture. The higherthe value the 易做图oother the picture will appear. Typical values are usually inthe range of 20 to 50.
-v
Print extra information.
-quiet
Do not print anything.
 
BUGS

Please report all bugs to our issue tracker:http://code.google.com/p/webp/issues
Patches welcome! See this page to get started:http://www.webmproject.org/code/contribute/submitting-patches/
 

EXAMPLES

gif2webp picture.gif -o picture.webp
gif2webp -q 70 picture.gif -o picture.webp
gif2webp -lossy -m 3 picture.gif -o picture_lossy.webp
gif2webp -lossy -f 50 picture.gif -o picture.webp
 

AUTHORS

gif2webp was written by the WebP team.
The latest source tree is available at http://www.webmproject.org/code
This manual page was written by Urvang Joshi <urvangAATTgoogle.com>, for theDebian project (and may be used by others).
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,