View Single Post
Old 12-21-2018, 10:18 PM   #22
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,167
Default

Quote:
Originally Posted by Justin View Post
Try this preset, which lets you control the top/left position of the image with parameters, and has a better size control:
Code:
// Track opacity/zoom/pan
//@param1:opacity 'opacity' 1
//@param2:zoom 'scale' 0 -2 2 0 .01
//@param3:xoffs 'X position' 0 -2000 2000 0 1
//@param4:yoffs 'Y position' 0 -2000 2000 0 1
//@param7:filter 'filter' 0 0 1 0.5 1
//@param8:clear 'clear bg' 1 0 1 0.5 1
//@param9:force_w 'force width' 0 0 2600 1024 2
//@param10:force_h 'force height' 0 0 2600 1024 2
//@param11:paspect 'preserve aspect' 1 0 1 0.5 1

(bg_img=input_ismaster() ? -2 : input_track(0)) ? (
  force_w &= -2; force_h &= -2;
  force_w && !force_h ? force_h = (force_w * project_h / project_w)&-2;
  force_h && !force_w ? force_w = (force_h * project_w / project_h)&-2;
  force_w>0 && force_h>0 ? ( project_w=force_w; project_h=force_h );

  w = opacity < 0.01 ? 0 : opacity > 0.99 ? 1 : opacity;
  gfx_blit((w < 1 || clear < 0.5) ? bg_img : -2,1);

  w > 0 ? (
    gfx_mode = filter>0.5 ? 256 : 0;
    gfx_a=w;
    dw = (project_w*10^zoom)|0;
    dh = (project_h*10^zoom)|0;
    gfx_blit(0,paspect, xoffs|0,yoffs|0,dw,dh);
  );
);
I will test that. Many thanks.
Eliseat is offline   Reply With Quote