add missing cropImageUtil file
This commit is contained in:
@@ -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,
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user