code: def render_image(self, rgbobj, dst_x, dst_y):
          
          if self.surface is None:
              return
          self.logger.debug("redraw surface")
  
          # get window contents as a buffer and paste it into the PIL surface
          # TODO: allow greater bit depths when support is better in PIL
          rgb_arr = self.viewer.getwin_array(order=self.rgb_order, dtype=np.uint8)
          p_image = Image.fromarray(rgb_arr)
  
          if self.surface is None or p_image.size != self.surface.size:
              # window size must have changed out from underneath us!
              width, height = self.viewer.get_window_size()
              self.resize((width, height))
              if p_image.size != self.surface.size:
                  raise render.RenderError("Rendered image does not match window size")
  
          self.surface.paste(p_image)
docs: Render the image represented by (rgbobj) at dst_x, dst_y
          in the pixel space.
          *** internal method-- do not use ***