add missing cropImageUtil file
parent
beddddcb57
commit
bf7aee19b8
|
@ -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,
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue