def METHOD_NAME(canvas):
    #FIXME - This is the WRONG way to do pixel sizes - we should be using a value in nm
    # we also shouldn't be calling a static method of an unrelated class to do this.
    #pixel_size = float(VideoPanel.ask(canvas, message='Please enter the pixel size (1 pixel on the screen = x pixel '
    #                                                  'in the snapshot', default_value='1'))
    #dlg = wx.TextEntryDialog(canvas, "Snapshot pixel size", "Please enter the desired pixel size in the snapshot", "5")
    #if dlg.ShowModal() == wx.ID_OK:
    if True:
        #pixel_size = float(dlg.GetValue())
        pixel_size=None
        #dlg.Destroy()
        settings = SnapshotSettings(_view_pixelsize=canvas.pixelsize, viewport_size_px=canvas.view_port_size)
        settings.configure_traits(kind='modal')
        #file_name = wx.FileSelector('Save current view as', wildcard="PNG files(*.png)|*.png",
        #                flags=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
        if settings.filename:
            # snap = canvas.getIm(pixel_size, GL_LUMINANCE)
            snap = canvas.getIm(settings.pixelsize, GL_RGB)
            print(snap.dtype, snap.shape, snap.max())
            if snap.ndim == 3:
                img = PIL.Image.fromarray(snap.transpose(1, 0, 2))
                #img = toimage(snap.transpose(1, 0, 2))
            else:
                img = PIL.Image.fromarray(snap.transpose())
                #img = toimage(snap.transpose())
            img = img.transpose(PIL.Image.FLIP_TOP_BOTTOM)
            if not settings.filename.endswith('.png'):
                img.save('{}.png'.format(settings.filename))
            else:
                img.save('{}'.format(settings.filename))