|
GimpChat Member |
Joined: Jan 09, 2015 Posts: 22
|
jontait2 wrote: I don't think there are any well-defined rules for Ministeck but one element used is randomness- if you run PicToBrick repeatedly on a solid colour background you'll find it produces different results each time! Ah, OK, well I can do that. Here's a version with randomness, and also works on images with alpha. RescaleSmallestDim=128 RescaleMethod=1 Colors=7 ColorMethod=1 MapContrast=1.0 Dither=0.0 TileSize=5 TileHighlight=0.08 TileShadow=0.12 PixelSize=2
-repeat @# -l[$>] -resize_ratio2d $RescaleSmallestDim,$RescaleSmallestDim,1,$RescaleMethod -split_opacity --colormap[0] $Colors,$ColorMethod AA={ia} --[-1] $AA -*[-1] $MapContrast -+[-1] $AA -index[0] [-1],$Dither,1 -c[0] 5,250 -rm[-1] -a c
--l --[0] {im-1} MM={iM} -s c -repeat @# -+[$>] $> -*[$>] {($MM+1)^$>} -done -+ 50%,50%,1,1,'x+y*w' -r[-1] [0],1 --*[-1] 0 -noise[-1] 25,2 -*[-1] -1 -n[-1] -1,1 -*[-1,-2] -repeat 6 --*[-1] 0 -noise[-1] 1,1 --dilate[-1] 3 -eq[-1,-2] -area_fg[-1] 0 -eq[-1] 1 --label_fg[-1] 0 -*[-2] [0] -dilate[-2,-1] 2 -replace[-2] 0,-1 -eq[-2] [0] -area_fg[-2] 0 -gt[-2] 3 -oneminus[-2] -*[1] [-2] -*[0] [-2] -oneminus[-2] -*[-1,-2] -done -r {$TileSize*w},{$TileSize*h},1,1,1 -repeat @# -l[$>] (1,0,1;0,0,0;1,0,1) -normalize_sum[1] --convolve[0] [1] -rm[1] -- -eq 0 -endl -done -min -dilate 2 (1,0;0,-1) -convolve[-2] [-1] -rm[-1] -+[-1] 1 -c[-1] {1+$TileHighlight},{1-$TileShadow} -endl
-rv -r[-1] {w*$TileSize},{h*$TileSize} -shift[-1] -1,-1 -split_opacity[-1] -*[1] [0] --[0] 1 -*[0] 128 -+[1] [0] -rm[0] -a c -r {w-1},{h-1},100%,100%,0 -r {$PixelSize*w},{$PixelSize*h},100%,100%,1 -c 0,255 -endl -done
By the way, as it turns out, I had set up a lot of steps in my original (more boring) script in preparation for adding randomness...but never actually did when I posted it. So, there was a lot of 100% useless calculation going on. Oops! I've edited my original post with a cleaned-up version, that also works on images with alpha channels too. It's also in the following spoiler. RescaleSmallestDim=128 RescaleMethod=1 Colors=7 ColorMethod=1 MapContrast=1.0 Dither=0.0 TileSize=5 TileHighlight=0.08 TileShadow=0.12 PixelSize=2
-repeat @# -l[$>] -resize_ratio2d $RescaleSmallestDim,$RescaleSmallestDim,1,$RescaleMethod -split_opacity --colormap[0] $Colors,$ColorMethod AA={ia} --[-1] $AA -*[-1] $MapContrast -+[-1] $AA -index[0] [-1],$Dither,1 -c[0] 5,250 -rm[-1] -a c --l -s c 50%,50%,1,1,'x+y*w' -r[-1] [0],1 -r {$TileSize*w},{$TileSize*h},1,1,1 -repeat @# -l[$>] (1,0,1;0,0,0;1,0,1) -normalize_sum[1] --convolve[0] [1] -rm[1] -- -eq 0 -endl -done -min -dilate 2 (1,0;0,-1) -convolve[-2] [-1] -rm[-1] -+[-1] 1 -c[-1] {1+$TileHighlight},{1-$TileShadow} -endl -rv -r[-1] {w*$TileSize},{h*$TileSize} -shift[-1] -1,-1 -split_opacity[-1] -*[1] [0] --[0] 1 -*[0] 128 -+[1] [0] -rm[0] -a c -r {w-1},{h-1},100%,100%,0 -r {$PixelSize*w},{$PixelSize*h},100%,100%,1 -c 0,255 -endl -done
Attachments: |
File comment: The G'MIC mascot Gmicky, filtered in ministeck style with my improved script.
Gmicky Ministeck.png [ 101.06 KiB | Viewed 1461 times ]
|
|
|