Reputation: 935
I have an image element of the SVG inb the HTML5,
The image size is: (stretch, preserveAspectRatio is set to "none") width=520px height=240px
then, I modify it to maintain aspect ratio (preserveAspectRatio is set to defer) because width>height, the height still the same = 240px but how can I calculate the new width (it is shrinked because the maintain aspect ratio) is there a formula to this?
Upvotes: 1
Views: 331