      @staticmethod
      def save_image(output_folder, filename, image):
          """ Save an image """
          output_file = os.path.join(output_folder, filename)
          cv2.imwrite(output_file, image)
  
  
  class Faces(MediaLoader):
      """ Object to hold the faces that are to be swapped out """
      def __init__(self, folder, verbose, dfl=False):
 
</s> remove         image = cv2.imread(src)
 </s> add         image = cv2.imread(src)  # pylint: disable=no-member </s> remove             yield filename, cv2.imread(filename)
 </s> add             yield filename, cv2.imread(filename)  # pylint: disable=no-member </s> remove         """ Crop an image around bounding box to the face """
 </s> add         """ Crop an image around bounding box to the face
            and capture it's dimensions """ </s> remove         self.serializer = self.get_serializer()
        self.location = self.get_location()
        self.have_alignments_file = os.path.exists(self.location)
        self.data = self.load()

    def frames_count(self):
        """ Return current frames count """
        return len(self.data)

    def faces_count(self):
        """ Return current faces count """
        return sum(len(faces) for faces in self.data.values())
 </s> add         self.is_extract = is_extract
        folder, filename = self.set_folder_filename()
        serializer = self.set_serializer()
        super().__init__(folder,
                         filename=filename,
                         serializer=serializer,
                         verbose=self.args.verbose)

    def set_folder_filename(self):
        """ Return the folder for the alignments file"""
        if self.args.alignments_path:
            folder, filename = os.path.split(str(self.args.alignments_path))
        else:
            folder = str(self.args.input_dir)
            filename = "alignments"
        return folder, filename </s> remove         return cv2.imread(filename)
 </s> add         return cv2.imread(filename)  # pylint: disable=no-member
        cv2.imwrite(output_file, image)  # pylint: disable=no-member
      @staticmethod
      def save_image(output_folder, filename, image):
          """ Save an image """
          output_file = os.path.join(output_folder, filename)
        cv2.imwrite(output_file, image)  # pylint: disable=no-member
  
  
  class Faces(MediaLoader):
      """ Object to hold the faces that are to be swapped out """
      def __init__(self, folder, verbose, dfl=False):
keep keep keep keep replace keep keep keep keep keep
 Fix convert-adjust (#531)

* Add dimensions to alignments + refactor

* Add frame_dims + funcs to DetectFaces. Add alignments lib

* Convert Adjust working

* Refactor and tidy up 
tools/lib_alignments/media.py