Reference

Table of Contents  ▸  List of Commands  ▸  Geometry Manipulation  ▸  warp◀  upscale_smart    |    warp_patch  ▶

warp

Built-in command

Arguments:

Description:

Warp selected images with specified displacement field.

mode can be { 0=backward-absolute | 1=backward-relative | 2=forward-absolute | 3=forward-relative }.
interpolation can be { 0=nearest-neighbor | 1=linear | 2=cubic }.
boundary_conditions can be { 0=dirichlet | 1=neumann | 2=periodic | 3=mirror }.

Default values:

mode=0, interpolation=1, boundary_conditions=1 and nb_frames=1.

This command has a tutorial page.

Example of use:

$ gmic image.jpg 100%,100%,1,2,'X=x/w-0.5;Y=y/h-0.5;R=(X*X+Y*Y)^0.5;A=atan2(Y,X);130*R*if(c==0,cos(4*A),sin(8*A))' warp[-2] [-1],1,1,0 quiver[-1] [-1],10,1,1,1,100

Command: image.jpg 100%,100%,1,2,'X=x/w-0.5;Y=y/h-0.5;R=(X*X+Y*Y)^0.5;A=atan2(Y,X);130*R*if(c==0,cos(4*A),sin(8*A))' warp[-2] [-1],1,1,0 quiver[-1] [-1],10,1,1,1,100
Command: image.jpg 100%,100%,1,2,'X=x/w-0.5;Y=y/h-0.5;R=(X*X+Y*Y)^0.5;A=atan2(Y,X);130*R*if(c==0,cos(4*A),sin(8*A))' warp[-2] [-1],1,1,0 quiver[-1] [-1],10,1,1,1,100