class_docstr: Class to represent an interface to the FreeImage library.
  This class is relatively thin. It provides a Pythonic API that converts
  Freeimage objects to Python objects, but that's about it.
  The actual implementation should be provided by the plugins.
  
  The recommended way to call into the Freeimage library (so that
  errors and warnings show up in the right moment) is to use this
  object as a context manager:
  with imageio.fi as lib:
      lib.FreeImage_GetPalette()
class_docstr_tok: ["Class","to","represent","an","interface","to","the","FreeImage","library",".","This","class","is","relatively","thin",".","It","provides","a","Pythonic","API","that","converts","Freeimage","objects","to","Python","objects",",","but","that","'s","about","it",".","The","actual","implementation","should","be","provided","by","the","plugins",".","The","recommended","way","to","call","into","the","Freeimage","library","(","so","that","errors","and","warnings","show","up","in","the","right","moment",")","is","to","use","this","object","as","a","context","manager",":","with","imageio.fi","as","lib",":","lib.FreeImage_GetPalette","(",")"]
docstr: Try to load the freeimage lib from the system. If not successful,
  try to download the imageio version and try again.
code: def load_freeimage(self):
      """Try to load the freeimage lib from the system. If not successful,
      try to download the imageio version and try again.
      """
      # Load library and register API
      success = False
      try:
          # Try without forcing a download, but giving preference
          # to the imageio-provided lib (if previously downloaded)
          self._load_freeimage()
          self._register_api()
          if self.lib.FreeImage_GetVersion().decode("utf-8") >= "3.15":
              success = True
      except OSError:
          pass
  
      if not success:
          # Ensure we have our own lib, try again
          get_freeimage_lib()
          self._load_freeimage()
          self._register_api()
  
      # Wrap up
      self.lib.FreeImage_SetOutputMessage(self._error_handler)
      self.lib_version = self.lib.FreeImage_GetVersion().decode("utf-8")
  
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 4 for calling the Freeimage obj's underlying member method code with example usage: obj.load_freeimage() without return types