add half image resizing

Minor, but "new Double(width * scaleFactor).intValue()" is a weird way to get an Integer. Why not just "width * scaleFactor"?