Fix bug in iosScaledImage; Added function iosImageWithCapInsets.