When input file is changed, `orig_height` and `orig_width` fields are reset, which causes thumbnail dimensions to be incorrectly calculated. Only draw thumbnails if both mentioned fields are non 0.
When input file is changed, `orig_height` and `orig_width` fields are reset, which causes thumbnail dimensions to be incorrectly calculated. Only draw thumbnails if both mentioned fields are non 0.