I'm attempting to export the contents of a full window or layout. The layout consists of a central ImageView with x and y axes. I'm able to export the image but then it ignores the axes and y inversion. For instance, something like this will export the central image.
```
from pyqtgraph.Qt import QtGui
import pyqtgraph as pg
import pyqtgraph.exporters
import numpy as np
app = QtGui.QApplication([])
win = QtGui.QMainWindow()
imv = pg.ImageView(view=pg.PlotItem())
img_view = imv.getView()
img_view.invertY(False)
img_view.setLimits(yMin=0, yMax=512)
img_view.getAxis("left").setScale(0.5)
win.setCentralWidget(imv)
win.show()
win.setWindowTitle("Range Plot")
imv.setPredefinedGradient("flame")
imv.setImage(np.zeros((2000, 513)), xvals=[i for i in range(2000)])
imv.setLevels(0, 100)
app.processEvents()
imv.export("plot.png")
```
How can I get this to export the full window as an image (preserving axes, aspect ratios, y-inversion, etc.)? Is there some window class or layout on which I can call `scene()`? Thanks.