import { imageSize } from 'image-size';
export function getImageSize(file) {
    if (file.tempFilePath) {
        const dimensions = imageSize(file.tempFilePath);
        return {
            height: dimensions.height,
            width: dimensions.width
        };
    }
    const buffer = Buffer.from(file.data);
    const dimensions = imageSize(buffer);
    return {
        height: dimensions.height,
        width: dimensions.width
    };
}

//# sourceMappingURL=getImageSize.js.map