          """
          logger.trace("Outputting frame: %s", filename)
          face_count = 0
          frame_name = os.path.splitext(filename)[0]
          extension = ".png"
          faces = self._select_valid_faces(filename, image)
          if not faces:
              return face_count
          if self._is_legacy:
              faces = self._process_legacy(filename, image, faces)
 
</s> remove             output = "{}_{}{}".format(frame_name, str(idx), extension)
            if self._arguments.large:
                self._frames.save_image(self._faces_dir, output, face.aligned.face)
            else:
                output = os.path.join(self._faces_dir, output)
                f_hash = self._extracted_faces.save_face_with_hash(output,
                                                                   extension,
                                                                   face.aligned.face)
                if self._is_legacy:  # Generate the new thumbnail and store new face data for save
                    face.thumbnail = generate_thumbnail(face.aligned.face, size=96, quality=60)
                    self._alignments.data[filename]["faces"][idx] = face.to_alignment()
                self._alignments.data[filename]["faces"][idx]["hash"] = f_hash
 </s> add             output = "{}_{}.png".format(frame_name, str(idx))
            meta = dict(alignments=face.to_png_meta(),
                        source=dict(alignments_version=self._alignments.version,
                                    original_filename=output,
                                    face_index=idx,
                                    source_filename=filename,
                                    source_is_video=self._frames.is_video))
            self._saver.save(output, encode_image(face.aligned.face, ".png", metadata=meta))
            if not self._arguments.large and self._is_legacy:
                face.thumbnail = generate_thumbnail(face.aligned.face, size=96, quality=60)
                self._alignments.data[filename]["faces"][idx] = face.to_alignment() </s> remove             basename = os.path.basename(filename)
            frame_name = os.path.splitext(basename)[0]
            extension = ".png"
            final_faces = []
 </s> add             src_filename = os.path.basename(filename)
            frame_name = os.path.splitext(src_filename)[0] </s> remove         self._faces = faces if faces else Faces(arguments.faces_dir)
 </s> add         kwargs = dict()
        if alignments.version < 2.1:
            # Update headers of faces generated with hash based alignments
            kwargs["alignments"] = alignments
        self._faces = faces if faces else Faces(arguments.faces_dir, **kwargs)
          """
          logger.trace("Outputting frame: %s", filename)
          face_count = 0
          frame_name = os.path.splitext(filename)[0]

          faces = self._select_valid_faces(filename, image)
          if not faces:
              return face_count
          if self._is_legacy:
              faces = self._process_legacy(filename, image, faces)
keep keep keep keep replace keep keep keep keep keep
 Update extracted faces to use PNG EXIF data (#1123)

Documentation
  - Update Usage.md, align.rst and image.rst
lib.image.py
  - read_image - Remove hash return, add metadata return
  - Remove read_image_hash functions
  - Add read_image_meta functios
  - Replace encode_image_with_hash with encode_image (to store metadata)
  - Add png meta reading and writing functions
  - Update Image Loaders/Savers to handle metadata rather than hashes
lib.training_data
  - Naming updates to remove references to hashes
lib.align.Alignments
  - Add versioning notes
  - Increment alignments version to 2.1
  - Deprecate hashing lookup functions
  - Replace filter_hashes with filter_faces
lib.align.detected_face
  - DetectedFace
    - Remove hash property
    - Add png header data serializing/deserializing functions
  - Mask
    - Add png header data serializing/deserializing functions
  - add update_legacy_png_header function to update png meta data
lib.cli.args - Deprecate alignments files for training
- plugins.train.trainer
  - Update alignments/mask code to read png header data
- scripts.convert
  - Aligned images folder - read data from png headers
- scripts.extract
  - Write png header information and no longer store hash of face
- tools.alignments
  - remove leftover-faces, merge and update-hashes jobs
  - Update jobs to use png meta data rather than hashes
- tools.manual
  - Update extract code to output png meta data and don't store hashes
  - Perform check on launch that tool is not pointing at a faces folder
tools.mask
  - Update to use png meta data
tools.sort
  - Update to use png meta data 
tools/alignments/jobs.py