  
          cv2.warpAffine( new_face, mat, image_size, new_image, cv2.WARP_INVERSE_MAP, cv2.BORDER_TRANSPARENT )
  
          outImage = None
          if self.seamlessClone:
              masky,maskx = cv2.transform( numpy.array([ size/2,size/2 ]).reshape(1,1,2) ,cv2.invertAffineTransform(mat) ).reshape(2).astype(int)
              outimage = cv2.seamlessClone(new_image.astype(numpy.uint8),base_image.astype(numpy.uint8),(image_mask*255).astype(numpy.uint8),(masky,maskx) , cv2.NORMAL_CLONE )
          else:
              foreground = cv2.multiply(image_mask, new_image.astype(float))
              background = cv2.multiply(1.0 - image_mask, base_image.astype(float))
 
</s> remove         if 'Rect' in self.maskType:
            face_src = numpy.ones(new_face.shape,dtype=float) 
 </s> add         if 'rect' in self.mask_type:
            face_src = numpy.ones(new_face.shape,dtype=float)
 </s> remove         if 'Hull' in self.maskType:
 </s> add         if 'hull' in self.mask_type:
 </s> remove         # if args.erosionKernelSize > 0:
        #     self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(args.erosionKernelSize,args.erosionKernelSize))
        # else:
        #     self.erosion_kernel = None

 </s> add  </s> remove         self.blurSize = 2
        self.seamlessClone = False
        self.maskType = 'Rect' # Choose in 'FaceHullAndRect','FaceHull','Rect'
 </s> add         if erosion_kernel_size is not None:
            self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(erosion_kernel_size,erosion_kernel_size))

        self.blur_size = blur_size
        self.seamless_clone = seamless_clone
        self.mask_type = mask_type.lower() # Choose in 'FaceHullAndRect','FaceHull','Rect'
 </s> remove         if self.maskType == 'Rect':
 </s> add         if self.mask_type == 'rect':

        if self.seamless_clone:

  
          cv2.warpAffine( new_face, mat, image_size, new_image, cv2.WARP_INVERSE_MAP, cv2.BORDER_TRANSPARENT )
  
          outImage = None
        if self.seamless_clone:
              masky,maskx = cv2.transform( numpy.array([ size/2,size/2 ]).reshape(1,1,2) ,cv2.invertAffineTransform(mat) ).reshape(2).astype(int)
              outimage = cv2.seamlessClone(new_image.astype(numpy.uint8),base_image.astype(numpy.uint8),(image_mask*255).astype(numpy.uint8),(masky,maskx) , cv2.NORMAL_CLONE )
          else:
              foreground = cv2.multiply(image_mask, new_image.astype(float))
              background = cv2.multiply(1.0 - image_mask, base_image.astype(float))
keep keep keep keep replace keep keep keep keep keep
 extended arguments for convert.py (#89)

* extended arguments for convert re https://github.com/deepfakes/faceswap/issues/85

* helptext for extended arguments.

* changed default mask type to facehullandrect 
plugins/Convert_Masked.py