dsh-image
文件与数据 活跃维护

dsh-image

uckkk/dsh-image

轻量级图片处理工具,支持读取图片尺寸与格式信息,可完成图片缩放、格式转换操作,内置ffmpeg无需额外安装依赖,调用简单,能快速集成到各类开发流程中完成图片基础处理。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
5 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:uckkk/dsh-image
git clone https://github.com/uckkk/dsh-image.git
git clone git@github.com:uckkk/dsh-image.git
README.md main

dsh-image · 图片处理

读取图片尺寸/格式、缩放与格式转换。基于内置 ffmpeg 二进制(跨平台)。纯 Node 实现。

提供的工具

工具 作用
image_info 读取宽×高与格式
resize_image 缩放(等比/指定尺寸)+ 转格式(jpg/png/webp)

安装

dsh plugin add dsh-image

安装后在 profile 的 package.jsondsh.profile.bundles 中加入 "dsh-image"

用法示例

把 hero.png 缩成 800 宽并转成 webp
→ 调用 resize_image(file="hero.png", width=800, outFile="hero.webp")

安装

dsh plugin add github:uckkk/dsh-image

安装即在本机运行第三方代码,请自行审阅源码。

安装

dsh plugin add github:uckkk/dsh-image

使用

安装后在会话中调用该插件注册的工具即可。

许可

MIT

安装即在本机运行第三方代码,请自行审阅源码。