@@ -726,9 +726,8 @@ def _process_element(self, element, ignore, image, coords, element_id, file_id,
726
726
element_array [sepmask ] = np .amax (element_array ) # clip to white/bg
727
727
image_clipped = array2pil (element_array )
728
728
file_path = self .workspace .save_image_file (
729
- image_clipped , file_id + '.IMG-CLIP' ,
730
- page_id = page_id ,
731
- file_grp = self .output_file_grp )
729
+ image_clipped , file_id + '.IMG-CLIP' , self .output_file_grp ,
730
+ page_id = page_id )
732
731
element .add_AlternativeImage (AlternativeImageType (
733
732
filename = file_path , comments = coords ['features' ] + ',clipped' ))
734
733
else :
@@ -768,9 +767,8 @@ def _process_element(self, element, ignore, image, coords, element_id, file_id,
768
767
element_array [sep_bin ] = np .amax (element_array ) # clip to white/bg
769
768
image_clipped = array2pil (element_array )
770
769
file_path = self .workspace .save_image_file (
771
- image_clipped , file_id + '.IMG-CLIP' ,
772
- page_id = page_id ,
773
- file_grp = self .output_file_grp )
770
+ image_clipped , file_id + '.IMG-CLIP' , self .output_file_grp ,
771
+ page_id = page_id )
774
772
# update PAGE (reference the image file):
775
773
element .add_AlternativeImage (AlternativeImageType (
776
774
filename = file_path , comments = coords ['features' ] + ',clipped' ))
0 commit comments