Hey Ren’Py Community,
I am trying to use a common python module in windows to take screenshots, PIL or Python Imaging Library. Basically, you call PIl.ImageGrabber.grab() to take a screenshot. Now when I take a screenshot with ren’py in windowed mode, it successfully takes a screenshot. However, when I take a screenshot in full screen mode, it does not take a screenshot of the ren’py screen but takes a picture of the windows desktop or just a black screen. Generally the screenshots are black but sometimes they are cropped.
Now, I would love to use the ‘renpy.takescreenshot()’ function, however, it saves it in a compressed file (the normal save files). I was wondering if there is a way I can get renpy to just dump a screenshot file, what command would I have to do? What python function would I need to write and where would I need to look?
Any and all advice on this is appreciated.
-Zeke
Screenshots in Ren'py
- Kosyne
- Newbie
- Posts: 4
- Joined: Sun May 27, 2012 4:14 am
- Organization: Kaos Team
- Location: n. A particular place or position.
- Contact:
Re: Screenshots in Ren'py
I can't remember, but since Ren'Py uses Pygame, you may be able to use one of it's built in functions to do this, discussed here.
Edit: This is also double-posted into the questions forum, so this topic should probably be deleted.
Edit: This is also double-posted into the questions forum, so this topic should probably be deleted.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Screenshots in Ren'py
I feel like the hardware rendering might be a bit separate from the pygame stuff and the pygame stuff might not have access to an accurate picture of the screen state. I could be entirely wrong, but I think you would want to use renpy.screenshot unless you have a very specific requirement, like needing to take a screenshot in memory.
EDIT: It also looks like renpy has some internal functions for doing this, which you could use if you're feeling daring. renpy.game.interface.get_screenshot() after you've used take_screenshot..
Being able to take a screenshot and keep it around as a displayable would be kind of cool though. Possible feature request?
EDIT: It also looks like renpy has some internal functions for doing this, which you could use if you're feeling daring. renpy.game.interface.get_screenshot() after you've used take_screenshot..
Being able to take a screenshot and keep it around as a displayable would be kind of cool though. Possible feature request?
- PyTom
- Ren'Py Creator
- Posts: 16093
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Screenshots in Ren'py
That's correct. You very likely want to use renpy.screenshot to save things to disk.Asceai wrote:I feel like the hardware rendering might be a bit separate from the pygame stuff and the pygame stuff might not have access to an accurate picture of the screen state. I could be entirely wrong, but I think you would want to use renpy.screenshot unless you have a very specific requirement, like needing to take a screenshot in memory.
FileCurrentScreenshot() displays the screenshot taken by take_screenshot.Being able to take a screenshot and keep it around as a displayable would be kind of cool though. Possible feature request?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Screenshots in Ren'py
6.17 I'm guessing?PyTom wrote:FileCurrentScreenshot() displays the screenshot taken by take_screenshot.
Anyway, it sounds really good. I'm guessing we can't copy it and have the old screenshot stay in there, but can probably render it and copy the render.
Who is online
Users browsing this forum: No registered users