Advertisement
Guest User

G'MIC "Vector Painting" code

a guest
Dec 9th, 2015
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #@gimp Vector painting : gimp_vector_painting, gimp_vector_painting_preview(1)
  2. #@gimp : Details = float(9,0,10)
  3. #@gimp : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate horizontal","Duplicate vertical")
  4. #@gimp : sep = separator(), note = note("<small>Author: <i>David Tschumperl&#233;</i>.\nLatest update: <i>08/25/2015</i>.</small>")
  5. gimp_vector_painting :
  6.   -repeat $! -l[$>]
  7.     --luminance -b. {10-$1}%,1,1
  8.     -f. "dmax = -1; nmax = 0;
  9.         for (n = 0, ++n<=8,
  10.           p = arg(n,-1,0,1,-1,1,-1,0,1);
  11.           q = arg(n,-1,-1,-1,0,0,1,1,1);
  12.           d = (j(p,q,0,0,0,1) - i)^2;
  13.           if (d>dmax,dmax = d; nmax = n,nmax)
  14.         )"
  15.     -blend shapeaverage
  16.   -endl -done
  17.  
  18. gimp_vector_painting_preview :
  19.   -gimp_split_preview "-gimp_vector_painting $*",$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement