hughsk/png-chunks-extract

语言: JavaScript

git: https://github.com/hughsk/png-chunks-extract

None
README.md (中文)

PNG-块提取物

stable

从PNG文件中提取数据块。

用于读取PNG图像的元数据,或作为更完整的PNG解析器的基础。

用法

NPM

块=提取(数据)

将原始图像文件数据作为Uint8Array或Node.js缓冲区,并返回一个块数组。每个块都有一个名称和数据缓冲区:

[
  { name: 'IHDR', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IEND', data: Uint8Array([]) }
]

执照

麻省理工学院,详见LICENSE.md。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

png-chunks-extract

stable

Extract the data chunks from a PNG file.

Useful for reading the metadata of a PNG image, or as the base of a more complete PNG parser.

Usage

NPM

chunks = extract(data)

Takes the raw image file data as a Uint8Array or Node.js Buffer, and returns an array of chunks. Each chunk has a name and data buffer:

[
  { name: 'IHDR', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IEND', data: Uint8Array([]) }
]

License

MIT, see LICENSE.md for details.