              logger.trace("Saved image: '%s'", filename)  # type:ignore
          except Exception as err:  # pylint: disable=broad-except
              logger.error("Failed to save image '%s'. Original Error: %s", filename, err)
  
      def save(self, filename: str, image: bytes, sub_folder: Optional[str] = None) -> None:
          """ Save the given image in the background thread
  
          Ensure that :func:`close` is called once all save operations are complete.
  
          Parameters
 
</s> remove             logger.error("Failed to save image '%s'. Original Error: %s", filename, err)
 </s> add             logger.error("Failed to save image '%s'. Original Error: %s", filename, str(err)) </s> remove     def _save(self, filename: str, image: bytes, sub_folder: Optional[str]) -> None:
 </s> add     def _save(self,
              filename: str,
              image: Union[bytes, np.ndarray],
              sub_folder: Optional[str]) -> None: </s> remove                  detected_faces: Optional[List["DetectedFace"]] = None) -> None:
 </s> add                  detected_faces: Optional[List["DetectedFace"]] = None,
                 is_aligned: bool = False) -> None: </s> remove         self._alignments.save()
        finalize(self._images.process_count + self._existing_count,
                 self._alignments.faces_count,
                 self._verify_output)
 </s> add 
    def save(self,
             filename: str,
             image: Union[bytes, np.ndarray],
             sub_folder: Optional[str] = None) -> None:
              logger.trace("Saved image: '%s'", filename)  # type:ignore
          except Exception as err:  # pylint: disable=broad-except
              logger.error("Failed to save image '%s'. Original Error: %s", filename, err)
  
    def save(self,
             filename: str,
             image: Union[bytes, np.ndarray],
             sub_folder: Optional[str] = None) -> None:
          """ Save the given image in the background thread
  
          Ensure that :func:`close` is called once all save operations are complete.
  
          Parameters
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/image.py