Some optimisations of Resizing Images