change box_image_size and add trimming