{"id":19168177,"url":"https://github.com/masx200/image-conversion-compression-webp","last_synced_at":"2025-05-07T14:26:43.649Z","repository":{"id":36978597,"uuid":"240178657","full_name":"masx200/image-conversion-compression-webp","owner":"masx200","description":"图片转换和压缩到webp,可设置输出图片最大像素数","archived":false,"fork":false,"pushed_at":"2023-11-13T03:36:57.000Z","size":167,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T14:11:02.025Z","etag":null,"topics":["image-processing","webp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masx200.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-13T04:42:48.000Z","updated_at":"2023-10-24T11:02:21.000Z","dependencies_parsed_at":"2024-11-09T09:41:49.845Z","dependency_job_id":"1ce38047-ff23-4be0-ad42-977b126eb651","html_url":"https://github.com/masx200/image-conversion-compression-webp","commit_stats":{"total_commits":146,"total_committers":3,"mean_commits":"48.666666666666664","dds":0.1986301369863014,"last_synced_commit":"5ed566f16e82403f82eda72e51e914e9ed1fa298"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masx200%2Fimage-conversion-compression-webp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masx200%2Fimage-conversion-compression-webp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masx200%2Fimage-conversion-compression-webp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masx200%2Fimage-conversion-compression-webp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masx200","download_url":"https://codeload.github.com/masx200/image-conversion-compression-webp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252894120,"owners_count":21820923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","webp"],"created_at":"2024-11-09T09:41:38.327Z","updated_at":"2025-05-07T14:26:43.630Z","avatar_url":"https://github.com/masx200.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image-conversion-compression-webp\n\n图片其他类型转换和压缩到 `webp`格式 ,可设置输出图片最大像素数\n\n给文件读取异步操作限流,防止文件打开过多报错\n\n判断输入图片内容类型,是否`webp`,如果是,则重命名扩展名为`webp`,因为有些图片的扩展名不正确\n\n## 安装依赖\n\n### 先安装 `GraphicsMagick`\n\n```shell\nsudo apt install graphicsmagick\n\n```\n\n或者下载`GraphicsMagick`\n\nftp://ftp.graphicsmagick.org/pub/GraphicsMagick/windows/GraphicsMagick-1.3.35-Q8-win64-dll.exe\n\nhttps://cdn.jsdelivr.net/gh/masx200/long-image-split-square@GraphicsMagick-1.3.34-Q16-win64/GraphicsMagick-1.3.34-Q16-win64-dll.exe.zip\n\nhttps://cdn.jsdelivr.net/gh/masx200/long-image-split-square@GraphicsMagick-1.3.34-Q16-win64/GraphicsMagick-1.3.34.tar.xz\n\n### 需要安装`libwebp`\n\n```shell\nsudo apt install  libwebp\n\n```\n\n或者下载`libwebp`的可执行文件\n\nhttp://downloads.webmproject.org/releases/webp/\n\nhttp://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0-windows-x64.zip\n\nhttps://cdn.jsdelivr.net/gh/masx200/long-image-split-square@libwebp/libwebp-1.0.1-windows-x64.zip\n\nhttps://cdn.jsdelivr.net/gh/masx200/long-image-split-square@libwebp-1.1.0-aarch64/libwebp-1.1.0-aarch64.zip\n\n### 安装 `node_modules`\n\n```\nyarn add @masx200/image-conversion-compression-webp\n```\n\n```shell\nyarn install\n```\n\n## 编译脚本\n\n```shell\nyarn build\n```\n\n## 运行脚本\n\n```shell\nyarn start\n```\n\n# 命令行示例:\n\n必选参数 `input`:类型 `string`,输入图片目录\n\n必选参数 `output`:类型`string`,输出图片目录\n\n可选参数 `maxpixels`:类型`number`,输出图片最大像素数\n\n可选参数 `concurrent`:类型`number`,同时运行的图片处理进程最大值\n\n可选参数 `inputextentions`:类型`string`,输入的文件扩展名,使用逗号分隔\n\n```shell\nnode ./dist/cli.js --input=D:/baidupandownload/图片输入/ --output=D:/baidupandownload/图片输出/\n\n```\n\n```shell\nnode ./dist/cli.js --input=D:/baidupandownload/图片输入/ --output=D:/baidupandownload/图片输出/ --maxpixels=4000000 --concurrent=4\n```\n\n```\nnpx @masx200/image-conversion-compression-webp --input=C:\\Pictures\\2020年5月17日\\图片 --output=C:\\Pictures\\2020年5月17日\\图片\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasx200%2Fimage-conversion-compression-webp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasx200%2Fimage-conversion-compression-webp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasx200%2Fimage-conversion-compression-webp/lists"}