]> marstr Code Repo - marstr/orthographic.git/commitdiff
Correction in completion image code
authorMarcus Str. <marcus@marstr.online>
Sun, 22 Dec 2024 17:03:48 +0000 (18:03 +0100)
committerMarcus Str. <marcus@marstr.online>
Sun, 22 Dec 2024 17:03:48 +0000 (18:03 +0100)
photogen.py

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