diff --git a/ImageGoNord/GoNord.py b/ImageGoNord/GoNord.py index 27717f3..9e034d8 100755 --- a/ImageGoNord/GoNord.py +++ b/ImageGoNord/GoNord.py @@ -218,7 +218,11 @@ def open_image(self, path): pillow image opened image """ - return Image.open(path) + opened_image = Image.open(path) + if (type(opened_image.getpixel((0,0))) == int): + opened_image = opened_image.convert('RGB') + + return opened_image def resize_image(self, image, size=(0, 0)): """ diff --git a/ImageGoNord/palettes/Nord/Aurora.txt b/ImageGoNord/palettes/Nord/Aurora.txt index e0fbfd0..b6fd1e3 100644 --- a/ImageGoNord/palettes/Nord/Aurora.txt +++ b/ImageGoNord/palettes/Nord/Aurora.txt @@ -2,5 +2,4 @@ #D08770 #EBCB8B #A3BE8C -#B48EAD - +#B48EAD \ No newline at end of file diff --git a/images/bn.jpg b/images/bn.jpg new file mode 100644 index 0000000..05811ed Binary files /dev/null and b/images/bn.jpg differ diff --git a/index.py b/index.py index 5f1b8d2..d639f66 100755 --- a/index.py +++ b/index.py @@ -6,13 +6,13 @@ # E.g. Avg algorithm and less colors go_nord.enable_avg_algorithm() -go_nord.reset_palette() +# go_nord.reset_palette() # go_nord.add_file_to_palette(NordPaletteFile.POLAR_NIGHT) # go_nord.add_file_to_palette(NordPaletteFile.SNOW_STORM) # go_nord.add_color_to_palette('#FF0000') -go_nord.set_default_nord_palette() +# go_nord.set_default_nord_palette() -image = go_nord.open_image("images/test.jpg") +image = go_nord.open_image("images/bn.jpg") go_nord.convert_image(image, save_path='images/test.avg.jpg') # E.g. Resized img no Avg algorithm and less colors