Added subimage generation to Image class.