How can I resize images within Ren'Py?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
NamelessNoun
Newbie
Posts: 17
Joined: Wed Feb 21, 2018 9:57 am
Contact:

How can I resize images within Ren'Py?

#1 Post by NamelessNoun »

I want to change the size of my sprites in Ren'Py; I've looked at the Animation and Transformation Language page on the website which told me to use zoom, but it does nothing when I place it before the position and crashes the script after the position.

I don't want to resize it in another program before putting it into Ren'Py because then I will need an obscene amount of sprite images.

I'd appreciate any help, thanks.

Examples in script:

show SA1 YouSad_Smile zoom 5.0 at Position (xpos = 0.5, xanchor= 0.5, ypos= 0.5, yanchor= 0.5)

show SA1 YouSad_Smile at Position (xpos = 0.5, xanchor= 0.5, ypos= 0.5, yanchor= 0.5) zoom 5.0

User avatar
Karamelow
Veteran
Posts: 230
Joined: Tue Mar 05, 2013 2:15 pm
Projects: Fujiwara BitterSweet
Organization: Magic Bench/Karamelow
Location: France
Contact:

Re: How can I resize images within Ren'Py?

#2 Post by Karamelow »

I don't know if it will help you, but here how I'm doing it with my own project. I simply show the sprite, then, below it, I write the zoom and the alignement:

show toshio mouth2 eye2 at center with vpunch:
zoom 2
yalign 0.30

Note: "2" after the "zoom" is how much I want it to be zoomed and 0.30 for the yalign is how I want my sprite to be aligned vertically (<-- depending on your original sprite' size, the value will change).
Image

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: How can I resize images within Ren'Py?

#3 Post by parttimestorier »

You can define the images like this:

Code: Select all

image YouSad_Smile = im.Scale("yousad_smile.png", 70, 100)
With the numbers replaced by the height and width you want in pixels.
ImageImageImage

Post Reply

Who is online

Users browsing this forum: Starberries