*无效set_system ('init_new_image','false')
gen_region_contour_xld (ObjectSelected, Region,'filled')
gen_image_const (NewImage,'byte', Width, Height)
*Create an image with a specified constant gray value
gen_image_proto (NewImage, ImageCleared1, 255)
*Paint regions into an image
paint_region (Region, ImageCleared1, ImageResult, 0,'fill')
write_image (ImageResult,'jpeg', 0,'D:/1111.jpg')
*Overpaint regions in an image
gen_image_proto (NewImage, ImageCleared2, 255)
overpaint_region(ImageCleared2, Region, 0,'fill')
注:paint_region 和overpaint_region最终的输出结果是一样的