Fixed Bug #65171 imagescale() fails

Third param (height) is set as optional,
but default value = -1 is incorrect

Compute correct height to preserve ratio.
NEWS