add missing cropImageUtil file

zio/stable
Piotr P 2024-04-27 14:59:00 +02:00
parent beddddcb57
commit bf7aee19b8
1 changed files with 13 additions and 0 deletions

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,
}
}