Guest User

Untitled

a guest
Dec 1st, 2011
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. #@gmic solidify
  2. #@gmic : Replace transparent regions of a RGBA image by morphologically interpolated color.
  3. #@gmic : $ image.jpg --luminance -ge[-1] 120 -*[-1] 255 -append c --solidify
  4. solidify :
  5.   -e[^-1] "Replace transparent regions of RGBA image$? by morphologically interpolated colors."
  6.   -v - -repeat @# -l[$>]
  7.     [-1] -split_opacity[-2] -t[-2] 50% -*[-1] [-2]
  8.     -replace_color[-1] 0,0,0,0,0,0,-1,-1,-1,-1 -to_rgb[-1]
  9.     -do
  10.       --dilate[-1] 3
  11.       -replace_color[-2] 0,0,-1,-1,-1,1000,1000,1000
  12.       -erode[-2] 3
  13.       -replace_color[-2] 0,0,1000,1000,1000,-1,-1,-1
  14.       -+[-2,-1] -/[-1] 2
  15.       -image[-1] [-3],0,0,0,0,1,[-2]
  16.     -while {im<0}
  17.     -rm[-3,-2]
  18.   -endl -done -v +
Advertisement
Add Comment
Please, Sign In to add comment