From 5ff52832a0e4ba35bab85a5a69f6918ebf63782f Mon Sep 17 00:00:00 2001 From: Ace Date: Sat, 6 Oct 2018 18:25:21 +0200 Subject: [PATCH] Update 3-Colour-converter.py --- For-developers-only/3-Colour-converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/For-developers-only/3-Colour-converter.py b/For-developers-only/3-Colour-converter.py index d4b3a68..ff545e5 100644 --- a/For-developers-only/3-Colour-converter.py +++ b/For-developers-only/3-Colour-converter.py @@ -40,7 +40,7 @@ for files in glob.glob("*.jpeg"): print('converting the images now') """First, a function. It's required for reducing colours""" -fn = lambda x : 255 if x > 179 else (0 if x < 178 else 179) +fn = lambda x : 179 if x == 179 else (255 if x > 179 else 0) """ Conversion is done in two steps: 1) Converting the file from .png or .jpeg .bmp to a greyscale .bmp