I\'m not really good at this math related things, so it turned out to be kinda long.
imageRatio = imageWidth / imageHeight if (imageWidth > imageHeight) {