Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gmic solidify
- #@gmic : Replace transparent regions of a RGBA image by morphologically interpolated color.
- #@gmic : $ image.jpg --luminance -ge[-1] 120 -*[-1] 255 -append c --solidify
- solidify :
- -e[^-1] "Replace transparent regions of RGBA image$? by morphologically interpolated colors."
- -v - -repeat @# -l[$>]
- [-1] -split_opacity[-2] -t[-2] 50% -*[-1] [-2]
- -replace_color[-1] 0,0,0,0,0,0,-1,-1,-1,-1 -to_rgb[-1]
- -do
- --dilate[-1] 3
- -replace_color[-2] 0,0,-1,-1,-1,1000,1000,1000
- -erode[-2] 3
- -replace_color[-2] 0,0,1000,1000,1000,-1,-1,-1
- -+[-2,-1] -/[-1] 2
- -image[-1] [-3],0,0,0,0,1,[-2]
- -while {im<0}
- -rm[-3,-2]
- -endl -done -v +
Advertisement
Add Comment
Please, Sign In to add comment