From de72a640c4ac956fe06ca7e0c36beeb73e557ef5 Mon Sep 17 00:00:00 2001 From: Steffen Hirtle Date: Tue, 19 Jul 2022 18:24:19 +0200 Subject: [PATCH 1/2] fixed display of mono images --- src/astroimage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/astroimage.py b/src/astroimage.py index b15820d..8303912 100644 --- a/src/astroimage.py +++ b/src/astroimage.py @@ -207,6 +207,8 @@ def copy_metadata(self, source_img): self.image_metadata = source_img.image_metadata def update_saturation(self): + self.img_display_saturated = self.img_display + if self.img_array.shape[-1] == 3: self.img_display_saturated = ImageEnhance.Color(self.img_display) self.img_display_saturated = self.img_display_saturated.enhance(self.saturation.get()) From 02eded9312ae3b917db0379d5a533e4855d45499 Mon Sep 17 00:00:00 2001 From: Steffen Hirtle Date: Tue, 19 Jul 2022 18:29:35 +0200 Subject: [PATCH 2/2] fixed display of image after applied crop --- src/astroimage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/astroimage.py b/src/astroimage.py index 8303912..b05839a 100644 --- a/src/astroimage.py +++ b/src/astroimage.py @@ -137,6 +137,7 @@ def get_stretch(self): def crop(self, startx, endx, starty, endy): self.img_array = self.img_array[starty:endy,startx:endx,:] self.img_display = self.img_display.crop((startx, starty, endx, endy)) + self.img_display_saturated = self.img_display_saturated.crop((startx, starty, endx, endy)) self.width = self.img_array.shape[1] self.height = self.img_array.shape[0] return