Tests and bugfixes of gd.Image.prototype.resized()