          try:
              if self._as_bytes:
                  with open(filename, "wb") as out_file:
                      out_file.write(image)
              else:
                  cv2.imwrite(filename, image)
              logger.trace("Saved image: '%s'", filename)  # type:ignore
 
</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) -> None:
 </s> add     def save(self,
             filename: str,
             image: Union[bytes, np.ndarray],
             sub_folder: Optional[str] = None) -> None: </s> remove                             source_is_video=False))  # Can't check so set false
 </s> add                             source_is_video=False,  # Can't check so set false
                            source_frame_dims=None))
                assert isinstance(image, bytes)
          try:
              if self._as_bytes:
                assert isinstance(image, bytes)
                  with open(filename, "wb") as out_file:
                      out_file.write(image)
              else:
                  cv2.imwrite(filename, image)
              logger.trace("Saved image: '%s'", filename)  # type:ignore
keep add 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