@yzfe/lib-psd-parse
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

lib-psd-parse

解释 photoshop PSD 文件

安装

yarn add @yzfe/lib-psd-parse

使用

import psdParse from '@yzfe/lib-psd-parse'

// Nodejs
const psdFile = path.join(__dirname, './t.psd')
const psdBlob = fs.readFileSync(psdFile)
psdParse(psdBlob).then(res => {
    console.log(res.tree)
})


// 浏览器
fetch('http://xx.psd').then(res => res.blob())
.then(async psdBlob => {
    const { tree } = await psdParse(psdBlob)
    console.log(tree)
})

/@yzfe/lib-psd-parse/

    Package Sidebar

    Install

    npm i @yzfe/lib-psd-parse

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    87.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • allenice
    • allenmo
    • vfasky