-Thank you!
How do you resize an image?
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.
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.
- Smoothie-Kisses
- Newbie
- Posts: 6
- Joined: Sun Feb 03, 2013 11:16 am
- Contact:
How do you resize an image?
For my visual novel there is a scene where a character is visible but the character is too big to see the whole character (right now i can only see his waist) and i am wondering is there anything to help shrink the character?

-Thank you!
-Thank you!
- Ayutac
- Regular
- Posts: 150
- Joined: Thu Oct 18, 2012 2:23 pm
- Projects: Pokémon Dating Sim
- Organization: A Breeze Of Science
- Deviantart: Ubro
- Location: Mayence, Germany
- Contact:
Re: How do you resize an image?
Wild guess: Google + "renpy scale"
Result: this
Feel free to adapt this concept for further questions that may arise.
Result: this
Feel free to adapt this concept for further questions that may arise.
Up next: An original, open source, text-based Dating Sim. Stay tuned ;)
- Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: How do you resize an image?
You may find it very complicated, maybe it really is, but here I go:
I have a very big sprite (806x2244) and I use transforms to show it in my game screen (my game is 1024x640). Put the following code inside your Init block (the start of your game code, where you define your sprites, backgrounds and so on):
You can change the example names "natural_size" and "half_size", if you want. Change 806,2244 to the width and height of your sprite in pixels.
yalign is the number of lines of pixels of the image that will be shown from top to bottom. You can change it for your image. In my case, my 806x2244 sprite is shown from the tip of the head down to the shoulders.
In the second transform, size is the new size of the image that you want (must be proportional to the original size, or the image may be deformed). Using this transform, my sprite is shown from the tip of the head down to his knees.
How to use this in your game? You will simply write:
or
write the name of your sprite in place of "mySprite".
I have a very big sprite (806x2244) and I use transforms to show it in my game screen (my game is 1024x640). Put the following code inside your Init block (the start of your game code, where you define your sprites, backgrounds and so on):
Code: Select all
transform natural_size:
on show:
yalign 610 xalign 0.5Code: Select all
transform half_size:
size (400,1114) crop(0,0,806,2244)
on show:
yalign 610 xalign 0.5yalign is the number of lines of pixels of the image that will be shown from top to bottom. You can change it for your image. In my case, my 806x2244 sprite is shown from the tip of the head down to the shoulders.
In the second transform, size is the new size of the image that you want (must be proportional to the original size, or the image may be deformed). Using this transform, my sprite is shown from the tip of the head down to his knees.
How to use this in your game? You will simply write:
Code: Select all
show mySprite at natural_sizeCode: Select all
show mySprite at halfsize, leftNo, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- Smoothie-Kisses
- Newbie
- Posts: 6
- Joined: Sun Feb 03, 2013 11:16 am
- Contact:
Re: How do you resize an image?
Thanks for your help, i'll try it 
xxxx
xxxx
Who is online
Users browsing this forum: Bing [Bot], khezo, span4ev, _ticlock_

