Nested image manipulators

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
chaos-dark-lord
Newbie
Posts: 8
Joined: Sun May 07, 2017 3:59 pm
Deviantart: chaos-dark-lord
Contact:

Nested image manipulators

#1 Post by chaos-dark-lord »

Im putting this because it took me a hell of a lot of time to figure it out and really couldnt find any answer or example as to how to use various image manipulators for the same image (not composite).

For example, lets say tha you want an image fliped horizontally and desaturated. Like for inner thoughts.

Normally, for 1 effect you have:

Code: Select all

image h flipped = im.Flip("normal_image.png", horizontal=True) 
or

Code: Select all

image h desaturate = im.MatrixColor("normal_image.png",im.matrix.saturation(0.4)*im.matrix.brightness(-0.1))
But for having both effects at the same time, you add the next manipulator inside the parenthesis like this:

Code: Select all

image h flipped desaturated= im.MatrixColor(im.Flip("normal_image.png", horizontal=True),im.matrix.saturation(0.4)*im.matrix.brightness(-0.1) )
Basically, after the first manipulator and inside the parenthesis you inmediatly add the second manipulator (which is the one that includes the file name and location) , the you add a ',' and then you add the rest of the effect.

Post Reply

Who is online

Users browsing this forum: No registered users