View Single Post
Old 04-13-2020, 04:16 AM   #16
joffo78
Human being with feelings
 
joffo78's Avatar
 
Join Date: May 2012
Posts: 1,279
Default

Hi evereyone


Does exist an effect that allows to set or change the size of an image with different setting for height and width ?

Thanks
Think i managed !
Quote:
// Track opacity/zoomxy/pan
//@param1pacity 'opacity' 1
//@param2:zoomy 'zoomwidth' 0 0 2 0
//@param3:zoomx 'zoomheight' 0 0 2 0
//@param4:xoffs 'X offset' 0 -1 1 0
//@param5:yoffs 'Y offset' 0 -1 1 0
//@param6:rotate 'rotate' 0 -360 360 0 1
//@param8:filter 'filter' 0 0 1 0.5 1
//@param9:clear 'clear bg' 1 0 1 0.5 1
//@param10:force_w 'force width' 0 0 2600 1024 2
//@param11:force_h 'force height' 0 0 2600 1024 2
//@param12aspect '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_a2=0;
gfx_blit((w < 1 || clear < 0.5) ? bg_img : -2,1);

w > 0 ? (
gfx_mode = filter>0.5 ? 256 : 0;
gfx_a=w;
z = 10^(zoomy/10);
dw = (project_w*zoomy)&-2;
dh = (project_h*zoomx)&-2;
x = (project_w - dw + xoffs*(project_w+dw))*.5;
y = (project_h - dh + yoffs*(project_h+dh))*.5;
rotate == 0 ? gfx_blit(0,paspect, x|0,y|0,dw,dh) : (
input_info(0,srcw,srch);
sc=2.0; sc2=sc*.5 - 0.5;
gfx_rotoblit(0,rotate*$pi/180,(x-dw*sc2)|0,(y-dh*sc2)|0,dw*sc,dh*sc, -srcw*sc2, -srch*sc2, srcw*sc, srch*sc);
);
);
);

Last edited by joffo78; 04-13-2020 at 04:29 AM.
joffo78 is offline   Reply With Quote