code: def _print_image(self, filename, format, *args, **kwargs):
      width, height = self.get_width_height()
      pixmap = gtk.gdk.Pixmap(None, width, height, depth=24)
      self._render_figure(pixmap, width, height)
  
      # jpg colors don't match the display very well, png colors match
      # better
      pixbuf = gtk.gdk.Pixbuf(
          gtk.gdk.COLORSPACE_RGB, 0, 8, width, height
      )
      pixbuf.get_from_drawable(
          pixmap, pixmap.get_colormap(), 0, 0, 0, 0, width, height
      )
  
      # set the default quality, if we are writing a JPEG.
      # http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#method-gdkpixbuf--save
      options = {k: kwargs[k] for k in ["quality"] if k in kwargs}
      if format in ["jpg", "jpeg"]:
          options.setdefault(
              "quality", rcParams["savefig.jpeg_quality"]
          )
          options["quality"] = str(options["quality"])
  
      pixbuf.save(filename, format, options=options)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import warnings
  import gobject
  import gtk
  import pango
  import numpy
  import matplotlib
  from matplotlib import rcParams
  from matplotlib._pylab_helpers import Gcf
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase
  from matplotlib.cbook import warn_deprecated
  from matplotlib.mathtext import MathTextParser
  from matplotlib.transforms import Affine2D
  from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
label_desc: Use image node_id 6 for calling the FigureCanvasGDK obj's underlying member method code with example usage: obj._print_image(filename, format) without return types