The image height or width (depending on aspect ratio) would never get set to '100%' because it was rounding incorrectly.  Updated to round only the numeric values.