Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadplugin("rotate.dll")
- framecount=30
- function myfunc(clip c, int w, int h,int pw, int ph)
- {
- x=round((pw / 2) - (w / 2))
- y=round((ph / 2) - (h / 2))
- small = BicubicResize(c,w,h).converttorgb32()
- l=round((pw-w)/2)
- t=0
- r=pw-w-l
- b=ph-h-t
- return small.addborders(l,t,r,b,color=$00000000).converttorgb32()
- }
- function myfunc2(clip c, int w, int h,int pw, int ph)
- {
- small = BicubicResize(c,w,h).converttorgb32()
- l=round((pw-w)/2)
- b=0
- r=pw-w-l
- t=ph-h
- return small.addborders(l,t,r,b,color=$00000000).converttorgb32()
- }
- f=imagesource("fenyo2.png",pixel_type="RGB32").trim(0,-1).converttoRGB32().loop(framecount).fliphorizontal()
- cs=imagesource("csizma2.png",pixel_type="RGB32").trim(0,-1).converttoRGB32().loop(framecount).fliphorizontal()
- nnw=128
- fenyo=f.lanczos4resize(nnw,round(nnw*f.height()/f.width()))
- csizma=cs.lanczos4resize(nnw,round(nnw*cs.height()/cs.width()))
- total_h=fenyo.height+csizma.height
- total_w=max(fenyo.width,csizma.width)
- fw=round(total_h*fenyo.width/fenyo.height)
- csw=round(total_h*csizma.width/csizma.height)
- kw=max(fw,csw)
- animated_fenyo=animate(fenyo,0,framecount,"myfunc",fw,total_h,kw,total_h,3,3,kw,total_h)
- animated_csizma=animate(csizma,0,framecount,"myfunc2",csw,total_h,kw,total_h,3,3,kw,total_h).reverse()
- blank=blankclip(pixel_type="RGB32",color=$ffffffff,width=round(1.59*kw),height=total_h).trim(0,-1).loop(framecount).converttorgb32()
- blank.overlay(animated_fenyo,mask=animated_fenyo.showalpha(pixel_type="RGB32"),x=30)
- overlay(animated_csizma,mask=animated_csizma.showalpha(pixel_type="RGB32"),x=30)
- flipped_csizma=animated_csizma.fliphorizontal().reverse()
- flipped_fenyo=animated_fenyo.fliphorizontal().reverse()
- overlay(flipped_fenyo,mask=flipped_fenyo.showalpha(pixel_type="RGB32"),x=200,y=0)
- overlay(flipped_csizma,mask=flipped_csizma.showalpha(pixel_type="RGB32"),x=200,y=0)
- final=last
- final+final.reverse()
- color=$ffffffff
- cw=last.Width
- ch=last.width
- Animate(last, 0, 2*framecount, "rotate", 0.0,color,0,-1, 0.0,cw,ch, 360.0,color,0,-1, 360.0,cw,ch).converttoRGB32()
- crop(0,8,-0,-0)
- addborders(0,8,0,0,color=$ffffffff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement