UNPKG

image-size

Version:

get dimensions of any image file

9 lines (8 loc) • 262 B
import { readUInt32BE, toUTF8String } from './utils.js'; export const PSD = { validate: (input) => toUTF8String(input, 0, 4) === '8BPS', calculate: (input) => ({ height: readUInt32BE(input, 14), width: readUInt32BE(input, 18), }), };