Fixed problem when resizing images
Fixed Image resize calculation