code: def __init__(self):
      vispy.app.Canvas.__init__(
          self, keys="interactive", size=(800, 800)
      )
      self.image = visuals.ImageVisual(get_image(), method="subdivide")
  
      # scale and center image in canvas
      s = 700.0 / max(self.image.size)
      t = 0.5 * (700.0 - (self.image.size[0] * s)) + 50
      self.image.transform = STTransform(
          scale=(s, s), translate=(t, 50)
      )
  
      self.show()
  
file_path: vispy/examples/basics/visuals/image_visual.py
imports: import numpy
  import vispy.app
  from vispy import gloo
  from vispy import visuals
  from vispy.visuals.transforms import STTransform
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: vispy.app with example: obj = Canvas()