polishing specimen view, put some duplicite code to img_common.c