diff --git a/src/astroimage.py b/src/astroimage.py index b15820d..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 @@ -207,6 +208,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())