def _repr_png_(self):
        """This is used by ipython to plot inline.
        """
        app.process_events()
        QApplication.processEvents()

        img = read_pixels()
        return bytes(_make_png(img))