class_docstr: Wrapper for the multipage FI bitmap object.
class_docstr_tok: ["Wrapper","for","the","multipage","FI","bitmap","object","."]
code: def save_to_filename(self, filename=None):
      if filename is None:  # pragma: no cover
          filename = self._filename
  
      # Prepare
      create_new = True
      read_only = False
      keep_cache_in_memory = False
  
      # Open the file
      # todo: Set flags at close func
      with self._fi as lib:
          multibitmap = lib.FreeImage_OpenMultiBitmap(
              self._ftype,
              efn(filename),
              create_new,
              read_only,
              keep_cache_in_memory,
              0,
          )
          multibitmap = ctypes.c_void_p(multibitmap)
  
          # Check
          if not multibitmap:  # pragma: no cover
              msg = (
                  'Could not open file "%s" for writing multi-image: %s'
                  % (
                      self._filename,
                      self._fi._get_error_message(),
                  )
              )
              raise ValueError(msg)
          self._set_bitmap(
              multibitmap, (lib.FreeImage_CloseMultiBitmap, multibitmap)
          )
  
imports: import os
  import sys
  import ctypes
  import threading
  import logging
  import numpy
  from ..core import get_remote_file, load_lib, Dict, resource_dirs, IS_PYPY, get_platform, InternetNotAllowedError, NeedDownloadError
label_desc: Use image node_id 2 for calling the FIMultipageBitmap obj's underlying member method code with example usage: obj.save_to_filename(filename) without return types