Trouble with image manipulation

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
mahoop
Regular
Posts: 46
Joined: Thu Jun 16, 2016 5:18 pm
Contact:

Trouble with image manipulation

#1 Post by mahoop »

I got the codes and functions, but I can't do it... I want to make my background go getting bigger and sliding down left. But growing enought to not leave the screen. I belive it would be the zoom tool and the position maniulation, I found all those commads in the Renpy Tutorial, but as a beginner I couldn't do that...

@EDIT
I could do that! But as I said I'm a beginner, so probably I'll do a stupid question.
That's my code:

Code: Select all

scene bg scene1 with dissolve:
        zoom 1.0
        linear 3.5 zoom 1.5
The zoom is focused on top left, how can i make it top right?

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Trouble with image manipulation

#2 Post by kivik »

I think what you want is size and crop:

Code: Select all

size (config.screen_width,config.screen_height) crop (x,y,width,height)
Use your favourite image editor to work out the x, y, width and height for the desired zoom.

Edit: I used config.screen_width and config.screen_height assuming that your image is full screen. If not, supply your own width and height there.

mahoop
Regular
Posts: 46
Joined: Thu Jun 16, 2016 5:18 pm
Contact:

Re: Trouble with image manipulation

#3 Post by mahoop »

kivik wrote:

Code: Select all

size (config.screen_width,config.screen_height) crop (x,y,width,height)
Sorry I don't get it, this will crop the point I want to zoom in? How do I can zoom in to this?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
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: Trouble with image manipulation

#4 Post by Donmai »

See here: https://www.renpy.org/doc/html/transfor ... transforms
All you need is to include the position you want. Not tested, but you can try

Code: Select all

    scene bg scene1:
        topright zoom 1.0
        linear 3.5 zoom 1.5
    with dissolve
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

mahoop
Regular
Posts: 46
Joined: Thu Jun 16, 2016 5:18 pm
Contact:

Re: Trouble with image manipulation

#5 Post by mahoop »

Donmai wrote:Not tested, but you can try
Perfect! And thank you for the link! Sometimes I lose myself in the renpy's documentation...

Post Reply

Who is online

Users browsing this forum: mirceea