Taking Picture Mechanic in RPG Maker MZ

I don't know if this is even possible but I want to create a game mechanic in which you can take a picture of the screen and then save it to a photo album. Throughout the game the pictures taken would pop up throughout a "dream sequence". I think I already know how I'll establish putting images into a photo album by assigning individual variables to the photos, but what I'm having trouble with is whether or not my idea is even plausible.

The main question here is if I can take in game screenshots or other forms of screen capture and have them be saved and assigned a variable, making them individual to every playthrough in a way.

If this isn't possible, I'd love to hear some alternative ideas for how I should go about this! I'm new to RPGMaker and don't know much of its limitations but I've been learning a lot! Thank you for reading.
theres a map-shot plugin that saves a picture of the whole map but i think it only works in. the editor. I don't know if this will help, but maybe it will 👍
theres a map-shot plugin that saves a picture of the whole map but i think it only works in. the editor.
Plugins by definition only work during the game. It's impossible to modify the editor.
The main question here is if I can take in game screenshots or other forms of screen capture and have them be saved and assigned a variable, making them individual to every playthrough in a way.
This gets a data URL (i.e. file-independent string representation) of a snapshot texture:
JavaScript:
SceneManager.snap()._canvas.toDataURL()
Since it's a string, there are no problems including it in save data. Note that it will generally be quite a long string, so be aware of possible save bloat issues.

You'll need an actual display object instance, like a Sprite, to show it in-game. E.g.
JavaScript:
sprite.bitmap = Bitmap.load(dataURL);
(I've used a similar approach in feature Q36 of my plugin Cae_Tweaks - "Show Picture snapshots".)
Plugins by definition only work during the game. It's impossible to modify the editor.
yea i didnt mean editor i meant playtest sorry
yea i didnt mean editor i meant playtest sorry
Ah, gotcha. I don't see anything in the plugin description to indicate that. It should work in a game - however, it does export the entire map as far as I can see.

I believe the code above from caethyril, grabbing the canvas, is only the currently visible area.

Original thread: https://forums.rpgmakerweb.com/threads/taking-picture-mechanic-in-rpg-maker-mz.173636/