After the user uploads an image, i possibly have to scale it down to a size that will fit into a given bounding box even after being rotated by an arbitrary angle later on. In this case, this has to be done right after the upload.
How do i calculate the target size for the image?
Thanks in advance for your help.
Edit: i don't see any relation to the question this one has been marked as duplicate for.