Updated repoinfo to contain version information about Pillow, removed unnecessary call from xp_normalmap.py

This commit is contained in:
Marcus Str. 2024-11-17 11:50:53 +01:00
parent ca02337f23
commit 2bfcabab0c
2 changed files with 13 additions and 12 deletions

View File

@ -82,6 +82,19 @@ Apart from that I am aware that the code is most likely not the best and can be
- Current Python version (3.10 and up)
- Python modules: Pillow (formerly PIL), requests, numpy
IMPORTANT NOTE: Make sure that Pillow is at least version 11.0. If you have it installed already, you can check the version by doing a
pip list
in either your normal installation or your virtual environment (venv) and check the output. For proper functionality, the result should show like this:
./pip list
Package Version
------------------ ---------
[...]
pillow 11.0.0
[...]
[section]Configuration[/section]

View File

@ -38,16 +38,6 @@ class mstr_xp_normalmap:
mstr_msg("xp_normalmap", "[X-Plane] Normal Map generator initialized")
# Load the layer image and resize it to 1/4th its size -
# then provide it
def load_layer(self):
qtr = int(mstr_photores / 4)
image = Image.open(mstr_datafolder + "_cache/" + str(self._lat) + "-" + str(self._tv) + "_" + str(self._lng) + "-" + str(self._th) + "_" + self._tag + "-" + self._value + "_layer.png")
image = image.resize((qtr,qtr), Image.Resampling.LANCZOS)
mstr_msg("xp_normalmap", "[X-Plane] Layer image loaded")
return image
# A few mathematical calls we need
# --------------------------------------------------------
def intensity(self, pixel):
@ -143,8 +133,6 @@ class mstr_xp_normalmap:
# The funnction to call. Blends with the existing map, or creates a new one
def build_normalmap(self, layer):
mstr_msg("xp_normalmap", "[X-Plane] Building normal map")
# The layer image
#lyr = self.load_layer()
# Make the normal map for the layer
nrm = self.generate_normal_map_for_layer(layer)