A JavaScript library for using CLIP STUDIO .clip file on browsers and Node.js
$ yarn add clipstudio # or npm install clipstudio
Browsers
import { ClipStudio } from 'clipstudio'
const inputFile = event => {
const [file] = event.target.files
const clip = await ClipStudio.load(file)
const thumbnail = clip.getThumbnail() // Blob
const layers = clip.getLayers() // Layer[]
}
Node.js
import { ClipStudio } from 'clipstudio'
import { promises as fs } from 'fs'
const file = await fs.readFile('path/to/clip-file')
const clip = await ClipStudio.load(file)
const thumbnail = clip.getThumbnail() // Buffer
const layers = clip.getLayers() // Layer[]
/*
[
{
id: '5f8f2d2381-7a44-f2a9-dfa6-51417dd5ad',
index: 1,
name: '',
opacity: 1,
isVisible: true,
isFolder: false
},
...
]
*/
Returns Promise of ClipStudio instance to use .clip file.
Returns thumbnail image data of .clip file.
Returns layers array.
{
id: string // uuid
index: number
name: string
opacity: number
isVisible: boolean
isFolder: boolean
}
MIT