test image resize and crop