Added functionality to correctly update the subimage width and height. For issue #30.