image-size
Version:
get dimensions of any image file
12 lines (11 loc) • 374 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.J2C = void 0;
const utils_1 = require("./utils");
exports.J2C = {
validate: (input) => (0, utils_1.readUInt32BE)(input, 0) === 0xff4fff51,
calculate: (input) => ({
height: (0, utils_1.readUInt32BE)(input, 12),
width: (0, utils_1.readUInt32BE)(input, 8),
}),
};