Page 1 of 1

Image Flip and Live Composite?

Posted: Tue Jun 24, 2014 1:34 pm
by cattro
So I found
image eileen flip = im.Flip("eileen_happy.png", vertical=True)
Which is awesome so I won't have to save my images twice, but how do I flip an image that's live composite?
If I use
image jenny flip = im.Flip(Jenny, horizontal=True) or with "Jenny"
it says it cannot find it?

Re: Image Flip and Live Composite?

Posted: Tue Jun 24, 2014 2:15 pm
by chirinworks
You need to use im.Flip for every separate part of your Live Composite.

Something copy-pasted from one of my own projects:

Code: Select all

def draw_roco(st, at): #Normal Version
        return LiveComposite(
            (245, 700),
            (0, 0), "s/r_body.png",
            (0, 0), "s/r_outfit.png",
            (0, 0), "s/r_face.png",
            ),.1
        
    def draw_roco_flip(st, at): #Flipped Version
        return LiveComposite(
            (245, 700),
            (0, 0), im.Flip("s/r_body.png", horizontal=True),
            (0, 0), im.Flip("s/r_outfit.png", horizontal=True),
            (0, 0), im.Flip("s/r_face.png", horizontal=True),
            ),.1

Re: Image Flip and Live Composite?

Posted: Tue Jun 24, 2014 8:00 pm
by Asceai
One trick is to do the flip live; that is, through a transform

Try:
image jenny flip = Transform(Jenny, xzoom=-1.0)