From 2bfcabab0caef06ae129752c4b1c284efcc01895 Mon Sep 17 00:00:00 2001 From: "Marcus Str." Date: Sun, 17 Nov 2024 11:50:53 +0100 Subject: [PATCH] Updated repoinfo to contain version information about Pillow, removed unnecessary call from xp_normalmap.py --- repoinfo | 13 +++++++++++++ xp_normalmap.py | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/repoinfo b/repoinfo index cd082eb..e21593b 100644 --- a/repoinfo +++ b/repoinfo @@ -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] diff --git a/xp_normalmap.py b/xp_normalmap.py index 8a0551b..9590c55 100644 --- a/xp_normalmap.py +++ b/xp_normalmap.py @@ -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) -- 2.30.2