add of the cropping to remove useless white part, and resize to fixed size