Fixed error in createThumb function

createThumb resized images with extra pixel cause incorrect rounding.