class_docstr: Wrapper for the FI bitmap object.
class_docstr_tok: ["Wrapper","for","the","FI","bitmap","object","."]
docstr: Quantize the bitmap to make it 8-bit (paletted). Returns a new
  FIBitmap object.
  Only for 24 bit images.
code: def quantize(self, quantizer=0, palettesize=256):
      """Quantize the bitmap to make it 8-bit (paletted). Returns a new
      FIBitmap object.
      Only for 24 bit images.
      """
      with self._fi as lib:
          # New bitmap
          bitmap = lib.FreeImage_ColorQuantizeEx(
              self._bitmap, quantizer, palettesize, 0, None
          )
          bitmap = ctypes.c_void_p(bitmap)
  
          # Check and return
          if not bitmap:
              raise ValueError(
                  'Could not quantize bitmap "%s": %s'
                  % (self._filename, self._fi._get_error_message())
              )
  
          new = FIBitmap(
              self._fi, self._filename, self._ftype, self._flags
          )
          new._set_bitmap(bitmap, (lib.FreeImage_Unload, bitmap))
          new._fi_type = self._fi_type
          return new
  
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 9 for calling the FIBitmap obj's underlying member method code with example usage: obj.quantize(quantizer, palettesize) and returns: new