npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rasso-plugin-gif-tool

v0.1.0

Published

GIF 动图逐帧拆解:自研轻量 LZW 解码,帧预览 + 帧时长精确 + 导出 PNG

Readme

GIF 拆帧 (rasso-plugin-gif-tool)

GIF 动图逐帧拆解:自研轻量 LZW 解码器(零第三方依赖),帧预览 + 帧时长精确 + 导出 PNG。

功能

  • 打开 GIF 拆帧:输入 GIF 拆帧 / 拆帧 / GIF 分解 / gif-tool 打开工具
  • 选择 GIF:文件选择器(sys.pickPaths)或拖入 GIF 文件
  • 自研 LZW 解码:零依赖解析 GIF(头/全局色表/GCE/图像块/LZW 变长码),精确帧时长(1/100s)与逐帧像素
  • 帧网格预览:逐帧缩略图 + 帧序号 + 单帧时长(cs),点击选中
  • 帧合成:处理 disposal(none/background/previous)+ 透明索引,逐帧渲染到 canvas
  • 导出 PNG:选中帧经 sys.pickSavePath 选择保存路径,sys.fileWriteBinary 二进制写出(白名单图片扩展名)
  • 双主题跟随:getTheme() 初始同步 + onThemeChanged 实时订阅 + 跟随/夜间/白天主题胶囊

解码器说明

gif-decoder.js 为独立 UMD 模块(浏览器挂 window.RassoGifDecoder,CommonJS 导出供 vitest 单测)。 LZW 解码采用 GIF 规范对称规则:解码端 nextCode === (1<<codeSize) 增长,编码端 nextCode > (1<<codeSize)(+1 偏移补偿), 支持 codeSize 2→12 位变长、clear/eoi 码、KwKwK 特殊情形。测试见 gif-decoder.test.js(含真实 base64 向量 + 往返)。

安全边界

导出经宿主白名单通道 sys.fileWriteBinary:仅写用户经保存对话框选中的路径,扩展名限图片(.png/.jpg/.jpeg/.webp/.gif), 大小上限 10MB。插件自身不接触任意路径写。

开发

pnpm gate   # 门禁(test + build + 架构护栏)