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