refactoring crop function
refactoring gmagick resize