- Current Python version (3.10 and up)\r
- Python modules: Pillow (formerly PIL), requests, numpy\r
\r
+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\r
+\r
+pip list\r
+\r
+in either your normal installation or your virtual environment (venv) and check the output. For proper functionality, the result should show like this:\r
+\r
+./pip list\r
+Package Version\r
+------------------ ---------\r
+[...]\r
+pillow 11.0.0\r
+[...]\r
+\r
\r
[section]Configuration[/section]\r
\r
mstr_msg("xp_normalmap", "[X-Plane] Normal Map generator initialized")\r
\r
\r
- # Load the layer image and resize it to 1/4th its size -\r
- # then provide it\r
- def load_layer(self):\r
- qtr = int(mstr_photores / 4)\r
- image = Image.open(mstr_datafolder + "_cache/" + str(self._lat) + "-" + str(self._tv) + "_" + str(self._lng) + "-" + str(self._th) + "_" + self._tag + "-" + self._value + "_layer.png")\r
- image = image.resize((qtr,qtr), Image.Resampling.LANCZOS)\r
- mstr_msg("xp_normalmap", "[X-Plane] Layer image loaded")\r
- return image\r
-\r
-\r
# A few mathematical calls we need\r
# --------------------------------------------------------\r
def intensity(self, pixel):\r
# The funnction to call. Blends with the existing map, or creates a new one\r
def build_normalmap(self, layer):\r
mstr_msg("xp_normalmap", "[X-Plane] Building normal map")\r
- # The layer image\r
- #lyr = self.load_layer()\r
\r
# Make the normal map for the layer\r
nrm = self.generate_normal_map_for_layer(layer)\r