Allowing Renpy to Output Images #5440
Labels
duration - day
Resolving this is estimated to a day of development
enhancement
A proposed or requested enhancement or improvement to renpy's features.
This is my first time writing an issue for a project, so I apologize if I don't know the etiquette for this kind of thing. But I've been working on a project where the creator would like there to be a way to export a sprite. This is because they'd like there to be a way for players to get the sprites as pngs outside the game, without having them open up the archive file and try to piece it together themselves. Especially if a sprite has a lot of layers and components. This would be useful for players if they wanted to have the sprite for reference or were making a video on the game and wanted to use it for editing.
I've been looking into the source code for days to try and accomplish this but have encountered one issue I cannot overcome. The main way I've found that kinda works is by making use of the screenshot functions. Sending it a render to get a surface with the actual pixels on it, and using it to output a file like renpy does to make screenshots normally. This has come with several caveats, however.
My wish is for a method to be added to gl2draw (and I suppose gldraw as well but I'm not as worried about that), that can do what the screenshot function does, but with transparency and using the surface given to it as the screen size instead of the default gui.size. From what I can tell, this wouldn't be too difficult. Just copying most of what the screenshot already does, copying in some of draw_screen to get the call to GL2DrawingContext setup, and should be good from there.
I've done my best to look into alternatives to this problem that could be used in more games that might desire this functionality as well, but I don't see a way of doing this without modifying the .pyx files myself, and that feels like more of a hack that people wouldn't feel comfortable doing themselves.
I will also say I will understand if the decision is made that this is undesirable as well, or could enable people to get around archive files. I don't know if I fully agree with this given far I've managed to get with this already. But I understand if this would be a step too far.
I hope I've made a good argument for this feature and if you would have any questions for me, I'd be more than happy to answer.
The text was updated successfully, but these errors were encountered: