fixes #4323 Image resize Not setting Width properly

Fixed the issue and pushed code for review, please check it.