script for resize image