Advertisement
Guest User

kisnagyfenyo

a guest
Apr 8th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. loadplugin("rotate.dll")
  2.  
  3. framecount=30
  4.  
  5. function myfunc(clip c, int w, int h,int pw, int ph)
  6. {
  7.   x=round((pw / 2) - (w / 2))
  8.   y=round((ph / 2) - (h / 2))
  9.   small = BicubicResize(c,w,h).converttorgb32()
  10.   l=round((pw-w)/2)
  11.   t=0
  12.   r=pw-w-l
  13.   b=ph-h-t
  14.   return small.addborders(l,t,r,b,color=$00000000).converttorgb32()
  15. }
  16.  
  17. function myfunc2(clip c, int w, int h,int pw, int ph)
  18. {
  19.   small = BicubicResize(c,w,h).converttorgb32()
  20.   l=round((pw-w)/2)
  21.   b=0
  22.   r=pw-w-l
  23.   t=ph-h
  24.   return small.addborders(l,t,r,b,color=$00000000).converttorgb32()
  25. }
  26.  
  27.  
  28. f=imagesource("fenyo2.png",pixel_type="RGB32").trim(0,-1).converttoRGB32().loop(framecount).fliphorizontal()
  29. cs=imagesource("csizma2.png",pixel_type="RGB32").trim(0,-1).converttoRGB32().loop(framecount).fliphorizontal()
  30. nnw=128
  31. fenyo=f.lanczos4resize(nnw,round(nnw*f.height()/f.width()))
  32. csizma=cs.lanczos4resize(nnw,round(nnw*cs.height()/cs.width()))
  33. total_h=fenyo.height+csizma.height
  34. total_w=max(fenyo.width,csizma.width)
  35. fw=round(total_h*fenyo.width/fenyo.height)
  36. csw=round(total_h*csizma.width/csizma.height)
  37. kw=max(fw,csw)
  38.  
  39. animated_fenyo=animate(fenyo,0,framecount,"myfunc",fw,total_h,kw,total_h,3,3,kw,total_h)
  40.  
  41.  
  42. animated_csizma=animate(csizma,0,framecount,"myfunc2",csw,total_h,kw,total_h,3,3,kw,total_h).reverse()
  43. blank=blankclip(pixel_type="RGB32",color=$ffffffff,width=round(1.59*kw),height=total_h).trim(0,-1).loop(framecount).converttorgb32()
  44. blank.overlay(animated_fenyo,mask=animated_fenyo.showalpha(pixel_type="RGB32"),x=30)
  45. overlay(animated_csizma,mask=animated_csizma.showalpha(pixel_type="RGB32"),x=30)
  46.  
  47. flipped_csizma=animated_csizma.fliphorizontal().reverse()
  48. flipped_fenyo=animated_fenyo.fliphorizontal().reverse()
  49. overlay(flipped_fenyo,mask=flipped_fenyo.showalpha(pixel_type="RGB32"),x=200,y=0)
  50. overlay(flipped_csizma,mask=flipped_csizma.showalpha(pixel_type="RGB32"),x=200,y=0)
  51.  
  52. final=last
  53. final+final.reverse()
  54. color=$ffffffff
  55. cw=last.Width
  56. ch=last.width
  57. 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()
  58. crop(0,8,-0,-0)
  59. addborders(0,8,0,0,color=$ffffffff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement