add missing cropImageUtil file

This commit is contained in:
Piotr P 2024-04-27 14:59:00 +02:00
parent beddddcb57
commit bf7aee19b8

View file

@ -0,0 +1,13 @@
export const calculateDimensions = (
maxWidth: number,
originalHeight: number,
originalWidth: number,
) => {
const aspectRatio = originalWidth / originalHeight
const newHeight = maxWidth / aspectRatio
const newWidth = maxWidth
return {
width: newWidth,
height: newHeight,
}
}