              will be stripped and replaced with :attr:`location`.
          image: numpy.ndarray
              The image to be saved
          """
          filename = os.path.join(self.location, os.path.basename(filename))
          try:
              if self._as_bytes:
                  with open(filename, "wb") as out_file:
                      out_file.write(image)
              else:
 
</s> remove         image: numpy.ndarray
            The image to be saved
 </s> add         image: bytes
            The encoded image to be saved
        subfolder: str or ``None``
            If the file should be saved in a subfolder in the output location, the subfolder should
            be provided here. ``None`` for no subfolder. </s> remove             The filename of the image to be saved
        image: numpy.ndarray
            The image to be saved
 </s> add             The filename of the image to be saved. NB: Any folders passed in with the filename
            will be stripped and replaced with :attr:`location`.
        image: bytes
            The encoded image to be saved
        subfolder: str, optional
            If the file should be saved in a subfolder in the output location, the subfolder should
            be provided here. ``None`` for no subfolder. Default: ``None`` </s> remove             logger.trace("Saved image: '%s'", filename)
 </s> add             logger.trace("Saved image: '%s'", filename)  # type:ignore </s> remove         logger.trace("Putting to save queue: '%s'", filename)
        self._queue.put((filename, image))
 </s> add         logger.trace("Putting to save queue: '%s'", filename)  # type:ignore
        self._queue.put((filename, image, sub_folder))
        location = os.path.join(self.location, sub_folder) if sub_folder else self._location
        if sub_folder and not os.path.exists(location):
            os.makedirs(location)

        filename = os.path.join(location, os.path.basename(filename))
              will be stripped and replaced with :attr:`location`.
          image: numpy.ndarray
              The image to be saved
          """
        location = os.path.join(self.location, sub_folder) if sub_folder else self._location
        if sub_folder and not os.path.exists(location):
            os.makedirs(location)

        filename = os.path.join(location, os.path.basename(filename))
          try:
              if self._as_bytes:
                  with open(filename, "wb") as out_file:
                      out_file.write(image)
              else:
keep keep keep keep replace keep keep keep keep keep
 Extract filter: Allow saving of filtered images 
lib/image.py