frst_pix[nx,ny] = nc\r
frst_noise = frst_noise.filter(ImageFilter.GaussianBlur(radius=1))\r
layer.alpha_composite(frst_noise)\r
+ \r
+ # Same for farmlands... but not as intensive\r
+ if (self._tag == "landuse" and self._value == "farmland") or (self._tag == "landuse" and self._value == "farmyard"):\r
+ frst_noise = Image.new("RGBA", (self._imgsize, self._imgsize))\r
+ frst_pix = frst_noise.load()\r
+ for n in range(0, 1500000):\r
+ nx = randrange(0, self._imgsize)\r
+ ny = randrange(0, self._imgsize)\r
+ na = randrange(25, 65)\r
+ nc = (0,0,0,na)\r
+ frst_pix[nx,ny] = nc\r
+ frst_noise = frst_noise.filter(ImageFilter.GaussianBlur(radius=1))\r
+ layer.alpha_composite(frst_noise)\r
\r
mstr_msg("layergen", "Layer image generated")\r
\r
self._tag == "natural" and self._value == "heath") or (\r
self._tag == "landuse" and self._value == "cemetery") or (\r
self._tag == "landuse" and self._value == "residential"):\r
- amt = randrange(150, 301)\r
+ amt = randrange(50,101)\r
masks = glob.glob(mstr_datafolder + "textures/tile/completion/*.png")\r
patchtags = [\r
["landuse", "meadow"],\r
for i in range(1, amt + 1):\r
layerpatch = Image.open(mstr_datafolder + "textures/tile/completion_color/p" + str(randrange(1,14)) + ".png")\r
if self._zoomlevel == 16:\r
- lpw = int(layerpatch.width/4)\r
- lph = int(layerpatch.height/4)\r
+ lpw = int(layerpatch.width/3)\r
+ lph = int(layerpatch.height/3)\r
layerpatch = layerpatch.resize((lpw,lph), resample=Image.Resampling.BILINEAR)\r
layerpatch = layerpatch.rotate(randrange(0, 360), expand=True)\r
lx = randrange(0, mstr_photores-layerpatch.width)\r