// Copyright 2002 Matt Sandstršm/Too Much Too Soon // This script is freeware, meaning you may copy and // distribute it free of charge, as long as it's kept intact, // including this message. Feel free to use the code as // inspiration for your own scripts, but don't steal. // Email me at mattias@beauty.se if you have any questions. // Thank you. Have fun. filter "Mosaic" group "TMTS Stylize" input sz, "Size", slider, 50, 1, 100 input aa, "Anti-alias", checkbox, 1 InformationFlag("YUVaware") code float i,j,w,h,sw,sh; point sp[4],dp[4]; DimensionsOf(dest, w, h); image buf[w][h]; sw = Integer(w/(101-10*sqrt(sz))); sh = Integer(sw/AspectOf(dest)+0.5); if aa == 1 blur(src1,buf,sw/2,aspectof(buf)); else buf = src1; end if; for i = -h to h-1 step sh for j = -w to w-1 step sw MakeRect(sp, j, i, 0, 0) MakeRect(dp, j, i, sw, sh) BlitRect(buf, sp, dest, dp) next next