@343dev/gifsicle

中文文档
1.2.0发布于 2026/06/25GPL-2.0-onlyES Module零依赖近 30 天下载 1.8万

gifsicle binary wrapper

原始使用文档
文档目录3 节
  1. Introduction
  2. Usage
  3. Notes

@343dev/gifsicle

npm

gifsicle binary wrapper for Node.js

Supported:

  • OS platform: darwin, linux, win32.
  • CPU architecture: arm64, x64.

Introduction

Gifsicle manipulates GIF image files. Depending on command line options, it can merge several GIFs into a GIF animation; explode an animation into its component frames; change individual frames in an animation; turn interlacing on and off; add transparency; add delays, disposals, and looping to animations; add and remove comments; flip and rotate; optimize animations for space; change images' colormaps; and other things.

Usage

Install:

npm i -g @343dev/gifsicle

Use:

gifsicle --optimize=2 --colors=128 --lossy=40 gif-not-optimized.gif > optimized.gif

Notes

gifsicle normally processes input GIF files according to its command line options and writes the result to the standard output.

gifsicle’s command line consists of GIF input files and options. Most options start with a dash - or plus +; frame selections, a kind of option, start with a number sign #. Anything else is a GIF input file.

gifsicle reads and processes GIF input files in order. If no GIF input file is given, or you give the special filename -, it reads from the standard input.

gifsicle exits with status 0 if there were no errors and status 1 otherwise.

Read the gifsicle man page

版本与发布记录

@343dev/gifsicle 共发布 3 个版本,首次发布于 2025/04/11;过去 12 个月发布了 2 个版本。

版本发布日期距今
1.2.0latest2026/06/254 个月前
1.1.02026/01/0210 个月前
1.0.02025/04/111.6 年前

关于 @343dev/gifsicle 的常见问题

@343dev/gifsicle 是什么?

gifsicle binary wrapper

如何安装 @343dev/gifsicle?

在项目目录运行 npm install @343dev/gifsicle,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gifsicle,可以用 npx gifsicle 直接运行。

@343dev/gifsicle 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/343dev__gifsicle 是否存在。

@343dev/gifsicle 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@343dev/gifsicle 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.17。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@343dev/gifsicle 可以商用吗?

@343dev/gifsicle 使用 GPL-2.0-only 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以兼容的 GPL 许可开源。仅在内部使用、不对外分发时不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@343dev/gifsicle 的下载量有多少?

根据 npm 官方下载统计,@343dev/gifsicle 在 2026/10/05 – 2026/11/03 这 30 天内被下载 17,982 次,日均约 599 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@343dev/gifsicle 还在维护吗?

最新版本 1.2.0 发布于 2026/06/25(4 个月前);至今共发布 3 个版本,其中过去 12 个月发布了 2 个;首次发布于 2025/04/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。