How to save a im.* object to a png-file with transparent bg?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

How to save a im.* object to a png-file with transparent bg?

#1 Post by iichan_lolbot » Mon Dec 05, 2011 4:57 pm

Subj. I have a im.MatrixColor object, how to save it's content to a png file?

In old RenPy versions I've done something like this and it worked:

Code: Select all

                img = im_ref.render(renpy.config.screen_width,renpy.config.screen_height,0,0)
                surf = img.pygame_surface()
                pygame.image.save(surf,filename)

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: How to save a im.* object to a png-file with transparent

#2 Post by iichan_lolbot » Mon Dec 12, 2011 6:28 pm

Hello?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: How to save a im.* object to a png-file with transparent

#3 Post by PyTom » Mon Dec 12, 2011 11:41 pm

There isn't a supported way of doing this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users