                              alignments_version=alignments.version,
                              original_filename=orig_filename,
                              face_index=face_idx,
                              source_filename=src_fname,
                              source_is_video=False))  # Can't check so set false
  
      out_filename = f"{os.path.splitext(filename)[0]}.png"  # Make sure saved file is png
      out_image = encode_image(in_image, ".png", metadata=meta)
  
      with open(out_filename, "wb") as out_file:
 
</s> remove             meta = dict(alignments=face.to_png_meta(),
                        source=dict(alignments_version=self._alignments.version,
                                    original_filename=output_filename,
                                    face_index=real_face_id,
                                    source_filename=os.path.basename(extract_media.filename),
                                    source_is_video=self._images.is_video,
                                    source_frame_dims=extract_media.image_size))
            image = encode_image(face.aligned.face, extension, metadata=meta)
 </s> add             aligned = face.aligned.face
            assert aligned is not None
            meta: PNGHeaderDict = dict(
                alignments=face.to_png_meta(),
                source=dict(alignments_version=self._alignments.version,
                            original_filename=output_filename,
                            face_index=real_face_id,
                            source_filename=os.path.basename(extract_media.filename),
                            source_is_video=self._loader.is_video,
                            source_frame_dims=extract_media.image_size))
            image = encode_image(aligned, extension, metadata=meta) </s> remove #: lib/cli/args.py:587
 </s> add #: lib/cli/args.py:583 </s> remove             metadata = dict(alignments=face.to_png_meta(),
                            source=extractor_output.frame_metadata)
 </s> add             metadata: "PNGHeaderDict" = dict(alignments=face.to_png_meta(),
                                             source=extractor_output.frame_metadata) </s> remove                 if not self._image_is_aligned:
 </s> add                 if not item.is_aligned:
                            source_is_video=False,  # Can't check so set false
                            source_frame_dims=None))
                              alignments_version=alignments.version,
                              original_filename=orig_filename,
                              face_index=face_idx,
                              source_filename=src_fname,
                            source_is_video=False,  # Can't check so set false
                            source_frame_dims=None))
  
      out_filename = f"{os.path.splitext(filename)[0]}.png"  # Make sure saved file is png
      out_image = encode_image(in_image, ".png", metadata=meta)
  
      with open(out_filename, "wb") as out_file:
keep keep keep keep replace keep keep keep keep keep
 Update Face Filter
  - Remove old face filter
  - plugins.extract.pipeline: Expose plugins directly
  - Change `is_aligned` from plugin level to ExtractMedia level
  - Allow extract pipeline to take faceswap aligned images
  - Add ability for recognition plugins to accept aligned faces as input
  - Add face filter to recognition plugin
  - Move extractor pipeline IO ops to own class 
lib/align/detected_face.py