code: def __init__(self):
      app.Canvas.__init__(self, size=(512, 512), keys="interactive")
      self.image = Program(img_vertex, img_fragment, 4)
      self.image["position"] = (-1, -1), (-1, +1), (+1, -1), (+1, +1)
      self.image["texcoord"] = (0, 0), (0, +1), (+1, 0), (+1, +1)
      self.image["vmin"] = +0.1
      self.image["vmax"] = +0.9
      self.image["cmap"] = 0  # Colormap index to use
  
      self.image["colormaps"] = colormaps
      self.image["colormaps"].interpolation = "linear"
      self.image["colormaps_shape"] = (
          colormaps.shape[1],
          colormaps.shape[0],
      )
  
      self.image["image"] = idxs.astype("float32")
      self.image["image"].interpolation = "linear"
  
      set_clear_color("black")
  
      self.show()
  
file_path: vispy/examples/demo/gloo/imshow.py
imports: import numpy
  from vispy import app
  from vispy.gloo import clear, set_clear_color, set_viewport, Program
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()