
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@yafh/image-map
Advanced tools
Rust 驱动的图片瓦片生成器,提供 Node.js SDK + CLI,适合批量切图与多级缩放瓦片生成。
pnpm add @yafh/image-map
image-map generate --input <file> --output <dir> [options]
默认会根据 EXIF 方向元数据自动校准输入图像方向,输出像素方向已校准。
常用选项:
--tile-size <n>:瓦片尺寸,默认 256。--format <fmt>:可重复,png | jpg | jpeg | webp,默认 webp。--origin <o>:topLeft | center,默认 topLeft。--min-zoom <n>:最小缩放级别,默认 0。--max-zoom <n>:最大缩放级别,默认 0。--auto-orient <bool>:是否按 EXIF 自动校准方向,默认 true。-h, --help:显示帮助。import { ImageMap } from '@yafh/image-map'
const result = await ImageMap.generate({
input: './input.png',
output: './tiles',
tileSize: 256,
formats: ['webp'],
origin: 'topLeft',
minZoom: 0,
maxZoom: 4,
// 默认 true:按 EXIF 自动校准输入方向
autoOrient: true,
})
console.log(result)
平台原生二进制由可选依赖提供,安装时会按需拉取对应平台包。
FAQs
Image tile generator (SDK + CLI)
The npm package @yafh/image-map receives a total of 12 weekly downloads. As such, @yafh/image-map popularity was classified as not popular.
We found that @yafh/image-map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.