代码拉取完成,页面将自动刷新
En | 中文
Run Gifsicle in your browser to compress, crop, frame, resize, and more on GIFs.
For more commands, please refer to the Gifsicle Manual.
gifsicleTool.js By combining multiple commands, it can complete more practical functions.
$ npm i gifsicle-wasm-browser --save
import gifsicle from "gifsicle-wasm-browser";
gifsicle.run({
input: [{
file: "./cat.gif",
name: "1.gif",
}],
command: [`
-e -U
--resize 100x_
1.gif
-o /out/out.gif`],
})
.then(outGifFiles => {
console.log(outGifFiles);
// [File,File,File ...]
});
<script type="module">
import gifsicle from 'https://unpkg.com/gifsicle-wasm-browser/dist/gifsical.min.js'
// or
import gifsicle from 'https://cdn.jsdelivr.net/npm/gifsicle-wasm-browser/dist/gifsicle.min.js'
...
})
</script>
Array
: input GIFs fileString
: the web url of the GIFFile
, Blob
, ArrayBuffer
: local files obtained via <input type="file">
String
: the filename that will be used in command
Array
: command to executeArray
: (optional) folder name to be used in command
Boolean
: (optional) command
End immediately on error or warningfalse
array of GIFs File
name
in input
can be customized, but cannot be repeated.command
must contain -o /out/**.gif
,/
, /out
, /tem
, when command
is executed, all files in /out
will be exportedcommand
will be executed one by one in sequence, please use multiple gifsicle.run()
if you need to process multiple GIFs at the same time. Execute sequentially | Execute simultaneously
gifsicle-wasm-browser is @renzhezhilu at wasm-codecs/gifsicle and Developed on the basis of gifsicle.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。