              logger.trace("Submitting: '%s'", item[0])
              executor.submit(self._save, *item)
          executor.shutdown()
  
      def _save(self, filename: str, image: bytes, sub_folder: Optional[str]) -> None:
          """ Save a single image inside a ThreadPoolExecutor
  
          Parameters
          ----------
          filename: str
 
</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             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                       metadata: Dict[str, Any]) -> Optional["ExtractMedia"]:
 </s> add                       metadata: "PNGHeaderDict") -> Optional["ExtractMedia"]: </s> remove                  detected_faces: Optional[List["DetectedFace"]] = None) -> None:
 </s> add                  detected_faces: Optional[List["DetectedFace"]] = None,
                 is_aligned: bool = False) -> None: </s> remove         The original frame
 </s> add         The original frame or a faceswap aligned face image
    def _save(self,
              filename: str,
              image: Union[bytes, np.ndarray],
              sub_folder: Optional[str]) -> None:
              logger.trace("Submitting: '%s'", item[0])
              executor.submit(self._save, *item)
          executor.shutdown()
  
    def _save(self,
              filename: str,
              image: Union[bytes, np.ndarray],
              sub_folder: Optional[str]) -> None:
          """ Save a single image inside a ThreadPoolExecutor
  
          Parameters
          ----------
          filename: str
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