Screenshot made in higher resolution - can it be done?

Is it possible to make a screenshot in higher resolution than Panda window? Let’s say I have a 800x600 Panda window, could I somehow get a screenshot in (for example) 1600x1200 resolution (without changing current Panda window)? Can it be done with offscreen buffers or something?

Thanks in advance,
Zarko

Yes i bet so but you would have to figure it out.

def createOffscreenBuffer(sort, xsize, ysize):
    winprops = WindowProperties.size(xsize,ysize)
    props = FrameBufferProperties()
    props.setRgbColor(1)
    props.setAlphaBits(1)
    props.setDepthBits(1)
    return base.graphicsEngine.makeOutput(
        base.pipe, "offscreenBuffer",
        sort, props, winprops,
        GraphicsPipe.BFRefuseWindow,
        base.win.getGsg(), base.win)

I use this to create offscreen buffers (probably from pro-rsoft). Pass in the higher resolution size and put the buffer in a variable. You’ll probably want to turn off the buffer until you are ready to take a screenshot though.

myBuff = createOffscreenBuffer(1, 1024, 768)
myBuff.setActive(False)

def screenBtn():
    myBuff.setActive(True)

base.accept('a', screenBtn)

def myTask(task):
    # Other task stuff here
    if myBuff.isActive():
        myBuff.saveScreenshotDefault()
        myBuff.setActive(False)

Thanks! I’ll try it…