Bitmap / screenshot from game screen

Hi,
I already tried Orange and a Korean plugin but the version of my game is too old to run them.
I need a function to take a screenshot of the current game screen and give me back a bitmap or save it as a png to a given folder (i prefer a bitmap). I somehow did it a loooong time ago for an experiment but that code is gone now, I think it started like var renderer = PIXI.renderer...

Anyone knows how to do it?

My goal is to create a code to make a screenshot and stamp the error.stack on top of it when an error occurs, it would help a lot when lending the game for testing to my friends. As for now I just have a code that creates txt files with the error stack, but i feel like
it won't be enough to reverse engineer the bugs.

TL;DR Need script/function to take a snapshot of the game and return a bitmap
Try tsukihime's mapshot script from himeworks.

which version of the core files does your project have? Can you update them?
Simply go to your project folder, then js folder, then use a text editor to open the rpg_core.js file.
The core version is the number at the end of the title line.
If there is no number on that line, it's 1.0 - and then you should try to update because 1.0 was extremely unstable.
I'm on the 1.3.5

Edit: I found the plugin you mention but i think it's for Maker VX, the syntax it's not from javascript

Edit 2: The command was simply SceneManager.snap(), it returns a bitmap when called -_-;
Need script/function to take a snapshot of the game and return a bitmap
This?

Using the snap function if the Bitmap object...
Code:
Bitmap.snap(SceneManager._scene)
Might even be able to set it as a game variable if your wanted...
Code:
$gameVariables.setValue(Bitmap.snap(SceneManager._scene))

Ps. On my phone sooo haven't tested anything, might not even work lol

Original thread: https://forums.rpgmakerweb.com/threads/bitmap-screenshot-from-game-screen.118775/