cropping images script modified