この質問がここに当てはまるかどうかはわかりませんが、PHP GD ライブラリなどで比率を維持しながら画像のサイズを変更する式を理解したいと思います。
たとえば、ここに例があります: http://salman-w.blogspot.com/2008/10/resize-images-using-phpgd-library.html
この例では、「target_aspect_ratio」が「original_aspect_ratio」より大きい場合、高さは targe_height で、幅は target_height * original_aspect_ratio で計算されます。
"original_aspect_ratio" が "target_aspect_ratio" より大きい場合、ターゲットの幅は target_width で、高さは target_width / original_aspect_ratio で計算されます
何故ですか?