Correction in completion image code

This commit is contained in:
Marcus Str. 2024-12-22 18:03:48 +01:00
parent 0b9d8433a6
commit 59cae087a4

View File

@ -87,13 +87,13 @@ class mstr_photogen:
edn = self.find_earthnavdata_number() edn = self.find_earthnavdata_number()
edns = self.latlng_folder(edn) edns = self.latlng_folder(edn)
cmpl_ptc = Image.open(mstr_datafolder + "textures/tile/completion/ptc.png") cmpl_ptc = Image.open(mstr_datafolder + "textures/tile/background/ptc.png")
cmpl_brd = Image.open(mstr_datafolder + "textures/tile/completion/brd.png") cmpl_brd = Image.open(mstr_datafolder + "textures/tile/background/brd.png")
# Generate the source image # Generate the source image
for p in range(1, 201): for p in range(1, 201):
rx = randrange(0 - int(cmpl_ptc.width / 2), ptc_full.width - int(cmpl_ptc.width / 2)) rx = randrange(0 - int(cmpl_ptc.width / 2), cmpl.width - int(cmpl_ptc.width / 2))
ry = randrange(0 - int(cmpl_ptc.height / 2), ptc_full.height - int(cmpl_ptc.height / 2)) ry = randrange(0 - int(cmpl_ptc.height / 2), cmpl.height - int(cmpl_ptc.height / 2))
cmpl.alpha_composite(cmpl_ptc, dest=(rx, ry)) cmpl.alpha_composite(cmpl_ptc, dest=(rx, ry))
cmpl.alpha_composite(cmpl_brd) cmpl.alpha_composite(cmpl_brd)