diff --git a/.DS_Store b/.DS_Store index 5a3b97f0914df60ba46dcad59bb9f21a33b07ac3..14b326202101cc184c0d7cd2ce290564e14f7429 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Projet/README.md b/Projet/README.md index 1922deb435725895926b76e2e804977faade6255..619961ec5d4de467e4dc9003b0f089084f1bd50b 100644 --- a/Projet/README.md +++ b/Projet/README.md @@ -28,5 +28,10 @@ author : Louis Chmielewski - 26/03 : corrections d'erreurs dans bloc.py - 26/03 : réalisation de la fonction decoupe_image +- 27/03 : redéfinition de la fonction decoupe image +- 27/03 : modification du fichier csv_en_png + +- 28/03 : modification apportés sur une partie de l'ensemble des fichiers + diff --git a/Projet/decoupe_image.py b/Projet/decoupe_image.py index e913c7ddebf78168c3312ebfbe35c94e862db0ba..fee122be38a42e65a887baa196cc909d5a7663f8 100755 --- a/Projet/decoupe_image.py +++ b/Projet/decoupe_image.py @@ -9,10 +9,19 @@ :date: 2024 mars """ +import sys +sys.path.append("src") from PIL import Image, ImageDraw from bloc import Bloc import manip_couleurs +image = Image.open("assets/calbuth.png") +image_rgb = im.convert('RGB') +image.size = (width, height) +image_rgb.pixel_hl = (0,0) +image_rgb.pixel_lr = (width, height) +draw = ImageDraw.Draw(image) + def decoupe_image(image: Bloc, ordre: int) -> Bloc: """ Decoupe un bloc en quatre bloc "ordre" fois @@ -20,27 +29,67 @@ def decoupe_image(image: Bloc, ordre: int) -> Bloc: Exemple(s) : $$$ - """ - draw = ImageDraw.Draw(image) - if ordre != 0: - en_4_blocs(image) - decoupe_image(*arg, ordre - 1) - if sont_4_blocs_uniformes_proches([bloc1, bloc2, bloc3, bloc4]): - couleur_mid = moyenne_couleur([bloc1, bloc2, bloc3, bloc4]) - pixel_hl = image.getpixel(image.pixel_hl(bloc1)) - pixel_lr = image.getpixel(image.pixel_lr(bloc4)) - draw.rectangle((pixel_hl),(pixel_lr), fill(couleur_mid)) + """ + if ordre != 0: + blocs = en_4_blocs(image) + for bloc in blocs: + decoupe_image(bloc, ordre - 1, draw) + + if sont_4_blocs_uniformes_proches(blocs): + couleur_mid = moyenne_couleur(blocs) + pixel_hl = image.pixel_hl + pixel_lr = image.pixel_lr + draw.rectangle((pixel_hl, pixel_lr), fill=couleur_mid) else: - pixel_hl = image.getpixel(image.pixel_hl(bloc1)) - pixel_lr = image.getpixel(image.pixel_lr(bloc4)) - draw.rectangle((pixel_hl),(pixel_lr)) + pixel_hl = image.pixel_hl + pixel_lr = image.pixel_lr + draw.rectangle((pixel_hl, pixel_lr)) else: - couleur_mid = moyenne_couleur(bloc) - pixel_hl = image.getpixel(image.pixel_hl(image)) - pixel_lr = image.getpixel(image.pixel_lr(image)) - draw.rectangle((pixel_hl),(pixel_lr), fill(couleur_mid)) + couleur_mid = moyenne_couleur(image) + pixel_hl = image.pixel_hl + pixel_lr = image.pixel_lr + draw.rectangle((pixel_hl, pixel_lr), fill=couleur_mid) + + +# if ordre != 0: +# blocs = en_4_blocs(image) +# for bloc in blocs: +# decoupe_image(bloc, ordre - 1, draw) +# +# if sont_4_blocs_uniformes_proches(blocs): +# couleur_mid = moyenne_couleur(blocs) +# pixel_hl = image.pixel_hl +# pixel_lr = image.pixel_lr +# draw.rectangle((pixel_hl, pixel_lr), fill=couleur_mid) +# else: +# pixel_hl = image.pixel_hl +# pixel_lr = image.pixel_lr +# draw.rectangle((pixel_hl, pixel_lr)) +# else: +# couleur_mid = moyenne_couleur(image) +# pixel_hl = image.pixel_hl +# pixel_lr = image.pixel_lr +# draw.rectangle((pixel_hl, pixel_lr), fill=couleur_mid) + + - +# if ordre != 0: +# en_4_blocs(image) +# decoupe_image(*arg, ordre - 1) +# if sont_4_blocs_uniformes_proches([bloc1, bloc2, bloc3, bloc4]): +# couleur_mid = moyenne_couleur([bloc1, bloc2, bloc3, bloc4]) +# pixel_hl = image.getpixel(image.pixel_hl(bloc1)) +# pixel_lr = image.getpixel(image.pixel_lr(bloc4)) +# draw.rectangle((pixel_hl),(pixel_lr), fill(couleur_mid)) +# else: +# pixel_hl = image.getpixel(image.pixel_hl(bloc1)) +# pixel_lr = image.getpixel(image.pixel_lr(bloc4)) +# draw.rectangle((pixel_hl),(pixel_lr)) +# else: +# couleur_mid = moyenne_couleur(bloc) +# pixel_hl = image.getpixel(image.pixel_hl(image)) +# pixel_lr = image.getpixel(image.pixel_lr(image)) +# draw.rectangle((pixel_hl),(pixel_lr), fill(couleur_mid)) \ No newline at end of file diff --git a/Projet/logiciel_lcom.py b/Projet/logiciel_lcom.py index 3af877e3828d8c8ff244759bcccfe036f5118809..f4031070344684b3981e5c4071790323dead71dc 100755 --- a/Projet/logiciel_lcom.py +++ b/Projet/logiciel_lcom.py @@ -10,25 +10,26 @@ """ import sys -import argparse +sys.path.append("src") +sys.path.append("assets") import numpy as np from PIL import * -import csv_en_png +from csv_en_png import * -def charger_image(chemin_fichier: str): +def charger_image(im: str): """ Charger une image depuis un fichier PNG ou CSV - Précondition : + Précondition : im est le chemin d'un fichier Exemple(s) : $$$ """ im = Image.open(input("Entrez le chemin du fichier : ")) im_rgb = im.convert('RGB') - if chemin_fichier.endswith('.png'): + if im.endswith('.png'): return im.show() - elif chemin_fichier.endswith('.csv'): - return csv_en_png + elif im.endswith('.csv'): + return csv_en_png(im) else: raise ValueError("Erreur, veuillez recommencer.") @@ -41,7 +42,8 @@ def traitement_image(image): """ int(input("Veuillez entrer l'ordre à laquelle vous voulez traiter l'image")) - return decoupe_image(image) + im_rgb = decoupe_image(image) + return im_rgb def enregistre_image(image): """ @@ -61,6 +63,9 @@ def main(): $$$ """ + charger_image() + traitement_image() + enregistre_image() if __name__ == "__main__": main() diff --git a/Projet/src/.DS_Store b/Projet/src/.DS_Store index 6de16898dbaa1a5d83b84cb7c438a80ac62ac4c3..b589339933fce1adb985c6e37f5c1e7081127b95 100644 Binary files a/Projet/src/.DS_Store and b/Projet/src/.DS_Store differ diff --git a/Projet/src/assets/mystere.csv b/Projet/src/assets/mystere.csv deleted file mode 100644 index 2f533e07dbaf516509216b30b66543ebcf114e12..0000000000000000000000000000000000000000 --- a/Projet/src/assets/mystere.csv +++ /dev/null @@ -1,1975 +0,0 @@ -0,0,128,128,255,255,255 -128,0,192,64,255,255,255 -192,0,256,64,255,255,255 -128,64,160,96,255,255,255 -160,64,192,96,255,255,255 -128,96,160,128,255,255,255 -160,96,192,128,246,246,246 -3,4,5,6 -192,64,224,96,255,255,255 -224,64,256,96,249,253,249 -192,96,224,128,204,235,201 -224,96,256,128,63,217,44 -8,9,10,11 -1,2,7,12 -0,128,32,160,255,255,255 -32,128,64,160,204,204,204 -0,160,32,192,255,255,255 -32,160,64,192,149,149,149 -14,15,16,17 -64,128,96,160,116,116,116 -96,128,128,160,255,255,255 -64,160,96,192,167,167,167 -96,160,128,192,236,236,236 -19,20,21,22 -0,192,32,224,247,247,247 -32,192,64,224,115,115,115 -0,224,32,256,242,242,242 -32,224,64,256,191,186,229 -24,25,26,27 -64,192,96,224,164,164,164 -96,192,128,224,158,158,158 -64,224,96,256,186,178,241 -96,224,128,256,158,150,213 -29,30,31,32 -18,23,28,33 -128,128,160,160,255,255,255 -160,128,192,160,125,133,124 -128,160,160,192,255,255,255 -160,160,192,192,111,129,109 -35,36,37,38 -192,128,224,160,22,141,8 -224,128,256,160,18,124,5 -192,160,224,192,19,130,6 -224,160,256,192,20,137,6 -40,41,42,43 -128,192,160,224,229,229,229 -160,192,192,224,78,130,72 -128,224,160,256,160,152,215 -160,224,192,256,79,171,91 -45,46,47,48 -192,192,256,256,32,212,10 -39,44,49,50 -0,13,34,51 -256,0,320,64,255,255,255 -320,0,384,64,255,255,255 -256,64,288,96,179,240,172 -288,64,320,96,126,229,113 -256,96,288,128,32,212,10 -288,96,320,128,32,212,10 -55,56,57,58 -320,64,352,96,111,227,97 -352,64,384,96,134,231,122 -320,96,352,128,32,212,10 -352,96,384,128,32,212,10 -60,61,62,63 -53,54,59,64 -384,0,448,64,255,255,255 -448,0,512,64,255,255,255 -384,64,416,96,197,243,191 -416,64,448,96,254,254,254 -384,96,416,128,32,212,10 -416,96,448,128,88,222,71 -68,69,70,71 -448,64,480,96,255,255,255 -480,64,512,96,255,255,255 -448,96,480,128,235,251,233 -480,96,512,128,255,255,255 -73,74,75,76 -66,67,72,77 -256,128,320,192,32,212,10 -320,128,384,192,32,212,10 -256,192,288,224,28,190,8 -288,192,320,224,32,212,10 -256,224,288,256,28,190,8 -288,224,320,256,32,212,10 -81,82,83,84 -320,192,384,256,32,212,10 -79,80,85,86 -384,128,448,192,32,212,10 -448,128,480,160,78,220,61 -480,128,512,160,251,254,251 -448,160,480,192,32,212,10 -480,160,512,192,184,241,177 -89,90,91,92 -384,192,448,256,32,212,10 -448,192,480,224,32,212,10 -480,192,512,224,141,232,130 -448,224,480,256,32,212,10 -480,224,512,256,160,236,151 -95,96,97,98 -88,93,94,99 -65,78,87,100 -0,256,32,288,255,255,255 -32,256,64,288,103,86,225 -0,288,32,320,255,255,255 -32,288,64,320,84,76,138 -102,103,104,105 -64,256,96,288,35,10,212 -96,256,128,288,35,10,212 -64,288,96,320,20,5,124 -96,288,128,320,30,8,187 -107,108,109,110 -0,320,32,352,255,255,255 -32,320,64,352,42,34,104 -0,352,32,384,236,236,236 -32,352,64,384,19,7,107 -112,113,114,115 -64,320,96,352,16,4,104 -96,320,128,352,31,8,191 -64,352,96,384,18,5,114 -96,352,128,384,25,7,153 -117,118,119,120 -106,111,116,121 -128,256,160,288,35,10,212 -160,256,192,288,39,68,160 -128,288,160,320,31,9,192 -160,288,192,320,32,9,197 -123,124,125,126 -192,256,224,288,32,212,10 -224,256,256,288,32,212,10 -192,288,224,320,34,114,81 -224,288,256,320,31,206,9 -128,129,130,131 -128,320,160,352,19,5,117 -160,320,192,352,28,8,174 -128,352,160,384,31,8,191 -160,352,192,384,19,5,121 -133,134,135,136 -192,320,224,352,18,5,113 -224,320,256,352,26,54,97 -192,352,224,384,20,5,127 -224,352,256,384,29,8,179 -138,139,140,141 -127,132,137,142 -0,384,32,416,252,252,252 -32,384,64,416,97,81,211 -0,416,32,448,255,255,255 -32,416,64,448,103,86,225 -144,145,146,147 -64,384,128,448,34,9,210 -0,448,32,480,255,255,255 -32,448,64,480,141,128,232 -0,480,32,512,255,255,255 -32,480,64,512,255,255,255 -150,151,152,153 -64,448,96,480,90,71,222 -96,448,128,480,90,71,222 -64,480,96,512,255,255,255 -96,480,128,512,255,255,255 -155,156,157,158 -148,149,154,159 -128,384,160,416,34,9,211 -160,384,192,416,33,9,203 -128,416,160,448,35,10,212 -160,416,192,448,35,10,212 -161,162,163,164 -192,384,224,416,33,9,201 -224,384,256,416,34,9,211 -192,416,224,448,35,10,212 -224,416,256,448,35,10,212 -166,167,168,169 -128,448,160,480,90,71,222 -160,448,192,480,90,71,222 -128,480,160,512,255,255,255 -160,480,192,512,255,255,255 -171,172,173,174 -192,448,224,480,90,71,222 -224,448,256,480,90,71,222 -192,480,224,512,255,255,255 -224,480,256,512,255,255,255 -176,177,178,179 -165,170,175,180 -122,143,160,181 -256,256,288,288,32,212,10 -288,256,320,288,32,212,10 -256,288,288,320,31,205,9 -288,288,320,320,30,202,9 -183,184,185,186 -320,256,352,288,32,212,10 -352,256,384,288,32,212,10 -320,288,352,320,31,208,9 -352,288,384,320,27,184,8 -188,189,190,191 -256,320,288,352,25,118,36 -288,320,320,352,23,135,10 -256,352,288,384,13,3,86 -288,352,320,384,216,214,228 -193,194,195,196 -320,320,352,352,19,130,6 -352,320,384,352,34,147,20 -320,352,352,384,143,144,143 -352,352,384,384,154,154,154 -198,199,200,201 -187,192,197,202 -384,256,416,288,32,212,10 -416,256,448,288,32,212,10 -384,288,416,320,32,212,10 -416,288,448,320,39,213,18 -204,205,206,207 -448,256,480,288,43,214,22 -480,256,512,288,234,250,232 -448,288,480,320,105,159,99 -480,288,512,320,255,255,255 -209,210,211,212 -384,320,416,352,98,192,87 -416,320,448,352,219,248,216 -384,352,416,384,241,241,241 -416,352,448,384,254,254,254 -214,215,216,217 -448,320,480,352,161,161,161 -480,320,512,352,255,255,255 -448,352,480,384,202,202,202 -480,352,512,384,255,255,255 -219,220,221,222 -208,213,218,223 -256,384,288,416,33,9,205 -288,384,320,416,227,224,249 -256,416,288,448,35,10,212 -288,416,320,448,227,224,249 -225,226,227,228 -320,384,352,416,244,244,244 -352,384,384,416,245,245,245 -320,416,352,448,255,255,255 -352,416,384,448,255,255,255 -230,231,232,233 -256,448,288,480,90,71,222 -288,448,320,480,234,232,250 -256,480,288,512,255,255,255 -288,480,320,512,255,255,255 -235,236,237,238 -320,448,384,512,255,255,255 -229,234,239,240 -384,384,512,512,254,254,254 -203,224,241,242 -52,101,182,243 ->>> -0,0,128,128,255,255,255 -128,0,192,64,255,255,255 -192,0,256,64,255,255,255 -128,64,160,96,255,255,255 -160,64,192,96,255,255,255 -128,96,160,128,255,255,255 -160,96,176,112,255,255,255 -176,96,192,112,255,255,255 -160,112,168,120,255,255,255 -168,112,176,120,255,255,255 -160,120,168,128,255,255,255 -168,120,176,128,247,247,247 -8,9,10,11 -176,112,184,120,255,255,255 -184,112,192,120,255,255,255 -176,120,184,128,191,191,191 -184,120,192,128,191,191,191 -13,14,15,16 -6,7,12,17 -3,4,5,18 -192,64,224,96,255,255,255 -224,64,240,80,255,255,255 -240,64,256,80,255,255,255 -224,80,240,96,255,255,255 -240,80,248,88,255,255,255 -248,80,256,88,255,255,255 -240,88,248,96,251,253,251 -248,88,256,96,171,237,164 -24,25,26,27 -21,22,23,28 -192,96,208,112,255,255,255 -208,96,216,104,255,255,255 -216,96,224,104,255,255,255 -208,104,216,112,255,255,255 -216,104,224,112,243,252,242 -31,32,33,34 -192,112,200,120,255,255,255 -200,112,208,120,255,255,255 -192,120,200,128,191,191,191 -200,120,208,128,179,188,179 -36,37,38,39 -208,112,216,120,225,248,223 -216,112,224,120,67,218,50 -208,120,216,128,47,174,33 -216,120,224,128,29,196,9 -41,42,43,44 -30,35,40,45 -224,96,232,104,255,255,255 -232,96,240,104,190,241,184 -224,104,232,112,113,226,100 -232,104,240,112,32,212,10 -47,48,49,50 -240,96,248,104,65,217,47 -248,96,256,104,32,212,10 -240,104,248,112,32,212,10 -248,104,256,112,32,212,10 -52,53,54,55 -224,112,240,128,32,212,10 -240,112,256,128,32,212,10 -51,56,57,58 -20,29,46,59 -1,2,19,60 -0,128,32,160,255,255,255 -32,128,48,144,255,255,255 -48,128,56,136,255,255,255 -56,128,64,136,199,199,199 -48,136,56,144,255,255,255 -56,136,64,144,102,102,102 -64,65,66,67 -32,144,48,160,255,255,255 -48,144,56,152,245,245,245 -56,144,64,152,15,15,15 -48,152,56,160,163,163,163 -56,152,64,160,0,0,0 -70,71,72,73 -63,68,69,74 -0,160,32,192,255,255,255 -32,160,40,168,255,255,255 -40,160,48,168,255,255,255 -32,168,40,176,255,255,255 -40,168,48,176,222,222,222 -77,78,79,80 -48,160,56,168,66,66,66 -56,160,64,168,27,27,27 -48,168,56,176,1,1,1 -56,168,64,176,118,118,118 -82,83,84,85 -32,176,40,184,255,255,255 -40,176,48,184,127,127,127 -32,184,40,192,253,253,253 -40,184,48,192,32,32,32 -87,88,89,90 -48,176,56,184,0,0,0 -56,176,64,184,211,211,211 -48,184,56,192,49,49,49 -56,184,64,192,254,254,254 -92,93,94,95 -81,86,91,96 -62,75,76,97 -64,128,72,136,0,0,0 -72,128,80,136,3,3,3 -64,136,72,144,7,7,7 -72,136,80,144,1,1,1 -99,100,101,102 -80,128,88,136,226,226,226 -88,128,96,136,255,255,255 -80,136,88,144,133,133,133 -88,136,96,144,255,255,255 -104,105,106,107 -64,144,72,152,93,93,93 -72,144,80,152,61,61,61 -64,152,72,160,186,186,186 -72,152,80,160,155,155,155 -109,110,111,112 -80,144,88,152,37,37,37 -88,144,96,152,254,254,254 -80,152,88,160,0,0,0 -88,152,96,160,194,194,194 -114,115,116,117 -103,108,113,118 -96,128,128,160,255,255,255 -64,160,72,168,252,252,252 -72,160,80,168,240,240,240 -64,168,72,176,255,255,255 -72,168,80,176,255,255,255 -121,122,123,124 -80,160,88,168,8,8,8 -88,160,96,168,97,97,97 -80,168,88,176,87,87,87 -88,168,96,176,12,12,12 -126,127,128,129 -64,176,80,192,255,255,255 -80,176,88,184,180,180,180 -88,176,96,184,0,0,0 -80,184,88,192,251,251,251 -88,184,96,192,23,23,23 -132,133,134,135 -125,130,131,136 -96,160,104,168,255,255,255 -104,160,112,168,255,255,255 -96,168,104,176,242,242,242 -104,168,112,176,255,255,255 -138,139,140,141 -112,160,128,176,255,255,255 -96,176,104,184,158,158,158 -104,176,112,184,255,255,255 -96,184,104,192,61,61,61 -104,184,112,192,255,255,255 -144,145,146,147 -112,176,128,192,255,255,255 -142,143,148,149 -119,120,137,150 -0,192,16,208,255,255,255 -16,192,32,208,255,255,255 -0,208,16,224,255,255,255 -16,208,24,216,255,255,255 -24,208,32,216,240,240,240 -16,216,24,224,255,255,255 -24,216,32,224,152,152,152 -155,156,157,158 -152,153,154,159 -32,192,40,200,188,188,188 -40,192,48,200,0,0,0 -32,200,40,208,91,91,91 -40,200,48,208,6,6,6 -161,162,163,164 -48,192,56,200,27,27,27 -56,192,64,200,63,63,63 -48,200,56,208,95,95,95 -56,200,64,208,95,95,95 -166,167,168,169 -32,208,40,216,9,9,9 -40,208,48,216,77,77,77 -32,216,40,224,0,0,0 -40,216,48,224,166,166,166 -171,172,173,174 -48,208,64,224,255,255,255 -165,170,175,176 -0,224,16,240,255,255,255 -16,224,24,232,255,255,255 -24,224,32,232,55,55,55 -16,232,24,240,255,255,255 -24,232,32,240,255,255,255 -179,180,181,182 -0,240,16,256,255,255,255 -16,240,32,256,255,255,255 -178,183,184,185 -32,224,40,232,11,11,11 -40,224,48,232,244,244,244 -32,232,40,240,255,255,255 -40,232,48,240,255,255,255 -187,188,189,190 -48,224,64,240,255,255,255 -32,240,40,248,255,255,255 -40,240,48,248,213,209,246 -32,248,40,256,255,255,255 -40,248,48,256,90,71,222 -193,194,195,196 -48,240,56,248,200,193,244 -56,240,64,248,200,193,244 -48,248,56,256,35,10,212 -56,248,64,256,35,10,212 -198,199,200,201 -191,192,197,202 -160,177,186,203 -64,192,72,200,63,63,63 -72,192,80,200,63,63,63 -64,200,72,208,95,95,95 -72,200,80,208,95,95,95 -205,206,207,208 -80,192,88,200,63,63,63 -88,192,96,200,19,19,19 -80,200,88,208,95,95,95 -88,200,96,208,91,91,91 -210,211,212,213 -64,208,80,224,255,255,255 -80,208,96,224,255,255,255 -209,214,215,216 -96,192,104,200,1,1,1 -104,192,112,200,218,218,218 -96,200,104,208,0,0,0 -104,200,112,208,122,122,122 -218,219,220,221 -112,192,128,208,255,255,255 -96,208,104,216,52,52,52 -104,208,112,216,28,28,28 -96,216,104,224,141,141,141 -104,216,112,224,0,0,0 -224,225,226,227 -112,208,120,216,252,252,252 -120,208,128,216,255,255,255 -112,216,120,224,184,184,184 -120,216,128,224,255,255,255 -229,230,231,232 -222,223,228,233 -64,224,80,240,255,255,255 -80,224,96,240,255,255,255 -64,240,72,248,200,193,244 -72,240,80,248,200,193,244 -64,248,72,256,35,10,212 -72,248,80,256,35,10,212 -237,238,239,240 -80,240,88,248,200,193,244 -88,240,96,248,200,193,244 -80,248,88,256,35,10,212 -88,248,96,256,35,10,212 -242,243,244,245 -235,236,241,246 -96,224,104,232,227,227,227 -104,224,112,232,2,2,2 -96,232,104,240,255,255,255 -104,232,112,240,255,255,255 -248,249,250,251 -112,224,120,232,87,87,87 -120,224,128,232,255,255,255 -112,232,120,240,255,255,255 -120,232,128,240,255,255,255 -253,254,255,256 -96,240,104,248,200,193,244 -104,240,112,248,200,193,244 -96,248,104,256,35,10,212 -104,248,112,256,35,10,212 -258,259,260,261 -112,240,120,248,200,193,244 -120,240,128,248,200,193,244 -112,248,120,256,35,10,212 -120,248,128,256,35,10,212 -263,264,265,266 -252,257,262,267 -217,234,247,268 -98,151,204,269 -128,128,160,160,255,255,255 -160,128,168,136,255,255,255 -168,128,176,136,223,223,223 -160,136,168,144,255,255,255 -168,136,176,144,223,223,223 -272,273,274,275 -176,128,184,136,0,0,0 -184,128,192,136,0,0,0 -176,136,184,144,0,0,0 -184,136,192,144,66,70,65 -277,278,279,280 -160,144,168,152,255,255,255 -168,144,176,152,223,223,223 -160,152,168,160,255,255,255 -168,152,176,160,223,223,223 -282,283,284,285 -176,144,184,152,0,0,0 -184,144,192,152,18,80,11 -176,152,184,160,0,0,0 -184,152,192,160,12,79,3 -287,288,289,290 -276,281,286,291 -128,160,160,192,255,255,255 -160,160,168,168,255,255,255 -168,160,176,168,223,223,223 -160,168,168,176,255,255,255 -168,168,176,176,221,222,221 -294,295,296,297 -176,160,184,168,0,0,0 -184,160,192,168,12,79,3 -176,168,184,176,0,0,0 -184,168,192,176,12,79,3 -299,300,301,302 -160,176,168,184,255,255,255 -168,176,176,184,172,212,168 -160,184,168,192,255,255,255 -168,184,176,192,114,201,104 -304,305,306,307 -176,176,184,184,0,0,0 -184,176,192,184,3,19,0 -176,184,184,192,0,0,0 -184,184,192,192,3,19,0 -309,310,311,312 -298,303,308,313 -271,292,293,314 -192,128,200,136,0,0,0 -200,128,208,136,0,0,0 -192,136,200,144,45,162,31 -200,136,208,144,24,159,7 -316,317,318,319 -208,128,216,136,0,0,0 -216,128,224,136,0,1,0 -208,136,216,144,22,152,7 -216,136,224,144,12,85,3 -321,322,323,324 -192,144,208,160,32,212,10 -208,144,224,160,32,212,10 -320,325,326,327 -224,128,232,136,8,56,2 -232,128,240,136,27,183,8 -224,136,232,144,0,0,0 -232,136,240,144,3,28,1 -329,330,331,332 -240,128,248,136,32,212,10 -248,128,256,136,32,212,10 -240,136,248,144,30,204,9 -248,136,256,144,32,212,10 -334,335,336,337 -224,144,232,152,11,77,3 -232,144,240,152,0,0,0 -224,152,232,160,19,130,6 -232,152,240,160,0,0,0 -339,340,341,342 -240,144,248,152,21,143,6 -248,144,256,152,32,212,10 -240,152,248,160,16,114,5 -248,152,256,160,32,212,10 -344,345,346,347 -333,338,343,348 -192,160,208,176,32,212,10 -208,160,216,168,32,212,10 -216,160,224,168,32,212,10 -208,168,216,176,32,212,10 -216,168,224,176,27,185,8 -351,352,353,354 -192,176,208,192,8,53,2 -208,176,216,184,6,46,2 -216,176,224,184,0,5,0 -208,184,216,192,9,64,2 -216,184,224,192,13,91,4 -357,358,359,360 -350,355,356,361 -224,160,232,168,17,116,5 -232,160,240,168,0,0,0 -224,168,232,176,3,25,1 -232,168,240,176,0,1,0 -363,364,365,366 -240,160,248,168,18,124,5 -248,160,256,168,32,212,10 -240,168,248,176,26,177,8 -248,168,256,176,32,212,10 -368,369,370,371 -224,176,232,184,0,0,0 -232,176,240,184,14,103,4 -224,184,232,192,24,162,7 -232,184,240,192,32,212,10 -373,374,375,376 -240,176,256,192,32,212,10 -367,372,377,378 -328,349,362,379 -128,192,144,208,255,255,255 -144,192,160,208,255,255,255 -128,208,136,216,255,255,255 -136,208,144,216,255,255,255 -128,216,136,224,191,191,191 -136,216,144,224,0,0,0 -383,384,385,386 -144,208,152,216,255,255,255 -152,208,160,216,255,255,255 -144,216,152,224,159,159,159 -152,216,160,224,255,255,255 -388,389,390,391 -381,382,387,392 -160,192,168,200,255,255,255 -168,192,176,200,71,193,56 -160,200,168,208,255,255,255 -168,200,176,208,45,188,29 -394,395,396,397 -176,192,184,200,0,0,0 -184,192,192,200,12,79,3 -176,200,184,208,0,0,0 -184,200,192,208,12,79,3 -399,400,401,402 -160,208,168,216,255,255,255 -168,208,176,216,31,185,13 -160,216,168,224,255,255,255 -168,216,176,224,38,186,21 -404,405,406,407 -176,208,184,216,0,0,0 -184,208,192,216,12,79,3 -176,216,184,224,0,0,0 -184,216,192,224,12,79,3 -409,410,411,412 -398,403,408,413 -128,224,136,232,191,191,191 -136,224,144,232,0,0,0 -128,232,136,240,255,255,255 -136,232,144,240,255,255,255 -415,416,417,418 -144,224,152,232,159,159,159 -152,224,160,232,255,255,255 -144,232,152,240,255,255,255 -152,232,160,240,255,255,255 -420,421,422,423 -128,240,136,248,200,193,244 -136,240,144,248,200,193,244 -128,248,136,256,35,10,212 -136,248,144,256,35,10,212 -425,426,427,428 -144,240,152,248,200,193,244 -152,240,160,248,200,193,244 -144,248,152,256,35,10,212 -152,248,160,256,35,10,212 -430,431,432,433 -419,424,429,434 -160,224,168,232,255,255,255 -168,224,176,232,56,190,40 -160,232,168,240,255,255,255 -168,232,176,240,94,223,79 -436,437,438,439 -176,224,184,232,0,0,0 -184,224,192,232,12,79,3 -176,232,184,240,32,212,10 -184,232,192,240,32,212,10 -441,442,443,444 -160,240,168,248,200,193,244 -168,240,176,248,117,202,130 -160,248,168,256,35,10,212 -168,248,176,256,51,66,178 -446,447,448,449 -176,240,192,256,32,212,10 -440,445,450,451 -393,414,435,452 -192,192,256,256,32,212,10 -315,380,453,454 -0,61,270,455 -256,0,320,64,255,255,255 -320,0,384,64,255,255,255 -256,64,272,80,255,255,255 -272,64,288,80,255,255,255 -256,80,264,88,254,254,254 -264,80,272,88,208,245,204 -256,88,264,96,71,218,54 -264,88,272,96,32,212,10 -461,462,463,464 -272,80,280,88,133,230,122 -280,80,288,88,70,218,52 -272,88,280,96,32,212,10 -280,88,288,96,32,212,10 -466,467,468,469 -459,460,465,470 -288,64,296,72,255,255,255 -296,64,304,72,255,255,255 -288,72,296,80,238,251,237 -296,72,304,80,197,243,192 -472,473,474,475 -304,64,312,72,255,255,255 -312,64,320,72,255,255,255 -304,72,312,80,163,236,155 -312,72,320,80,139,232,128 -477,478,479,480 -288,80,304,96,32,212,10 -304,80,320,96,32,212,10 -476,481,482,483 -256,96,288,128,32,212,10 -288,96,320,128,32,212,10 -471,484,485,486 -320,64,328,72,255,255,255 -328,64,336,72,255,255,255 -320,72,328,80,127,229,115 -328,72,336,80,117,228,104 -488,489,490,491 -336,64,344,72,255,255,255 -344,64,352,72,255,255,255 -336,72,344,80,125,229,114 -344,72,352,80,137,231,126 -493,494,495,496 -320,80,336,96,32,212,10 -336,80,352,96,32,212,10 -492,497,498,499 -352,64,360,72,255,255,255 -360,64,368,72,255,255,255 -352,72,360,80,160,235,151 -360,72,368,80,192,242,187 -501,502,503,504 -368,64,376,72,255,255,255 -376,64,384,72,255,255,255 -368,72,376,80,233,250,232 -376,72,384,80,255,255,255 -506,507,508,509 -352,80,368,96,32,212,10 -368,80,376,88,32,212,10 -376,80,384,88,62,217,44 -368,88,376,96,32,212,10 -376,88,384,96,32,212,10 -512,513,514,515 -505,510,511,516 -320,96,352,128,32,212,10 -352,96,384,128,32,212,10 -500,517,518,519 -457,458,487,520 -384,0,448,64,255,255,255 -448,0,512,64,255,255,255 -384,64,400,80,255,255,255 -400,64,416,80,255,255,255 -384,80,392,88,125,229,113 -392,80,400,88,198,243,193 -384,88,392,96,32,212,10 -392,88,400,96,32,212,10 -526,527,528,529 -400,80,408,88,253,254,253 -408,80,416,88,255,255,255 -400,88,408,96,61,217,43 -408,88,416,96,158,235,149 -531,532,533,534 -524,525,530,535 -416,64,448,96,254,254,254 -384,96,416,128,32,212,10 -416,96,424,104,55,215,36 -424,96,432,104,172,238,165 -416,104,424,112,32,212,10 -424,104,432,112,32,212,10 -539,540,541,542 -432,96,440,104,254,254,254 -440,96,448,104,255,255,255 -432,104,440,112,94,223,79 -440,104,448,112,234,250,232 -544,545,546,547 -416,112,432,128,32,212,10 -432,112,440,120,32,212,10 -440,112,448,120,55,215,36 -432,120,440,128,32,212,10 -440,120,448,128,32,212,10 -550,551,552,553 -543,548,549,554 -536,537,538,555 -448,64,480,96,255,255,255 -480,64,512,96,255,255,255 -448,96,464,112,255,255,255 -464,96,480,112,255,255,255 -448,112,456,120,210,245,206 -456,112,464,120,255,255,255 -448,120,456,128,44,213,23 -456,120,464,128,201,243,197 -561,562,563,564 -464,112,480,128,255,255,255 -559,560,565,566 -480,96,512,128,255,255,255 -557,558,567,568 -522,523,556,569 -256,128,320,192,32,212,10 -320,128,384,192,32,212,10 -256,192,272,208,32,212,10 -272,192,288,208,32,212,10 -256,208,264,216,32,212,10 -264,208,272,216,32,212,10 -256,216,264,224,28,185,8 -264,216,272,224,0,0,0 -575,576,577,578 -272,208,280,216,32,212,10 -280,208,288,216,32,212,10 -272,216,280,224,16,106,5 -280,216,288,224,32,212,10 -580,581,582,583 -573,574,579,584 -288,192,320,224,32,212,10 -256,224,264,232,28,185,8 -264,224,272,232,0,0,0 -256,232,264,240,32,212,10 -264,232,272,240,32,212,10 -587,588,589,590 -272,224,280,232,16,106,5 -280,224,288,232,32,212,10 -272,232,280,240,32,212,10 -280,232,288,240,32,212,10 -592,593,594,595 -256,240,272,256,32,212,10 -272,240,288,256,32,212,10 -591,596,597,598 -288,224,320,256,32,212,10 -585,586,599,600 -320,192,384,256,32,212,10 -571,572,601,602 -384,128,448,192,32,212,10 -448,128,456,136,32,212,10 -456,128,464,136,45,214,25 -448,136,456,144,32,212,10 -456,136,464,144,32,212,10 -605,606,607,608 -464,128,472,136,213,246,210 -472,128,480,136,255,255,255 -464,136,472,144,61,216,42 -472,136,480,144,240,251,239 -610,611,612,613 -448,144,464,160,32,212,10 -464,144,472,152,32,212,10 -472,144,480,152,115,227,102 -464,152,472,160,32,212,10 -472,152,480,160,33,212,11 -616,617,618,619 -609,614,615,620 -480,128,496,144,255,255,255 -496,128,512,144,255,255,255 -480,144,488,152,255,255,255 -488,144,496,152,255,255,255 -480,152,488,160,204,244,200 -488,152,496,160,255,255,255 -624,625,626,627 -496,144,512,160,255,255,255 -622,623,628,629 -448,160,480,192,32,212,10 -480,160,488,168,93,223,78 -488,160,496,168,255,255,255 -480,168,488,176,33,212,11 -488,168,496,176,223,248,220 -632,633,634,635 -496,160,512,176,255,255,255 -480,176,488,184,32,212,10 -488,176,496,184,149,233,139 -480,184,488,192,32,212,10 -488,184,496,192,90,222,75 -638,639,640,641 -496,176,512,192,255,255,255 -636,637,642,643 -621,630,631,644 -384,192,448,256,32,212,10 -448,192,480,224,32,212,10 -480,192,488,200,32,212,10 -488,192,496,200,47,214,27 -480,200,488,208,32,212,10 -488,200,496,208,32,212,10 -648,649,650,651 -496,192,504,200,254,254,254 -504,192,512,200,255,255,255 -496,200,504,208,245,252,244 -504,200,512,208,255,255,255 -653,654,655,656 -480,208,496,224,32,212,10 -496,208,504,216,230,249,229 -504,208,512,216,255,255,255 -496,216,504,224,237,250,236 -504,216,512,224,255,255,255 -659,660,661,662 -652,657,658,663 -448,224,480,256,32,212,10 -480,224,488,232,32,212,10 -488,224,496,232,35,212,14 -480,232,488,240,32,212,10 -488,232,496,240,66,218,48 -666,667,668,669 -496,224,512,240,254,254,254 -480,240,488,248,32,212,10 -488,240,496,248,117,227,104 -480,248,488,256,32,212,10 -488,248,496,256,184,240,178 -672,673,674,675 -496,240,512,256,255,255,255 -670,671,676,677 -647,664,665,678 -604,645,646,679 -521,570,603,680 -0,256,32,288,255,255,255 -32,256,40,264,255,255,255 -40,256,48,264,90,71,222 -32,264,40,272,255,255,255 -40,264,48,272,90,71,222 -683,684,685,686 -48,256,64,272,35,10,212 -32,272,40,280,255,255,255 -40,272,48,280,90,71,222 -32,280,40,288,255,255,255 -40,280,48,288,90,71,222 -689,690,691,692 -48,272,64,288,35,10,212 -687,688,693,694 -0,288,32,320,255,255,255 -32,288,40,296,255,255,255 -40,288,48,296,83,69,181 -32,296,40,304,255,255,255 -40,296,48,304,66,64,85 -697,698,699,700 -48,288,56,296,21,6,132 -56,288,64,296,21,6,132 -48,296,56,304,0,0,5 -56,296,64,304,4,1,26 -702,703,704,705 -32,304,40,312,255,255,255 -40,304,48,312,41,41,41 -32,312,40,320,243,243,243 -40,312,48,320,2,2,2 -707,708,709,710 -48,304,56,312,10,3,67 -56,304,64,312,35,10,212 -48,312,56,320,17,5,110 -56,312,64,320,35,10,212 -712,713,714,715 -701,706,711,716 -682,695,696,717 -64,256,96,288,35,10,212 -96,256,128,288,35,10,212 -64,288,72,296,21,6,132 -72,288,80,296,21,6,134 -64,296,72,304,4,1,26 -72,296,80,304,4,1,24 -721,722,723,724 -80,288,88,296,24,6,152 -88,288,96,296,32,9,197 -80,296,88,304,0,0,3 -88,296,96,304,1,0,8 -726,727,728,729 -64,304,80,320,35,10,212 -80,304,88,312,30,8,189 -88,304,96,312,2,0,18 -80,312,88,320,35,10,212 -88,312,96,320,8,2,49 -732,733,734,735 -725,730,731,736 -96,288,104,296,35,10,212 -104,288,112,296,35,10,212 -96,296,104,304,24,6,148 -104,296,112,304,35,10,212 -738,739,740,741 -112,288,128,304,35,10,212 -96,304,104,312,7,1,46 -104,304,112,312,35,10,212 -96,312,104,320,6,1,42 -104,312,112,320,35,10,212 -744,745,746,747 -112,304,128,320,35,10,212 -742,743,748,749 -719,720,737,750 -0,320,32,352,255,255,255 -32,320,40,328,197,197,197 -40,320,48,328,0,0,0 -32,328,40,336,147,147,147 -40,328,48,336,0,0,0 -753,754,755,756 -48,320,56,328,24,7,152 -56,320,64,328,35,10,212 -48,328,56,336,11,3,67 -56,328,64,336,13,3,79 -758,759,760,761 -32,336,40,344,99,99,99 -40,336,48,344,2,0,14 -32,344,40,352,48,48,48 -40,344,48,352,10,2,63 -763,764,765,766 -48,336,56,344,13,3,79 -56,336,64,344,13,3,79 -48,344,56,352,35,10,212 -56,344,64,352,35,10,212 -768,769,770,771 -757,762,767,772 -0,352,16,368,255,255,255 -16,352,24,360,255,255,255 -24,352,32,360,249,249,249 -16,360,24,368,255,255,255 -24,360,32,368,204,204,204 -775,776,777,778 -0,368,16,384,255,255,255 -16,368,24,376,255,255,255 -24,368,32,376,157,157,157 -16,376,24,384,255,255,255 -24,376,32,384,106,106,106 -781,782,783,784 -774,779,780,785 -32,352,40,360,6,6,6 -40,352,48,360,16,4,105 -32,360,40,368,0,0,0 -40,360,48,368,23,6,143 -787,788,789,790 -48,352,64,368,35,10,212 -32,368,40,376,0,0,0 -40,368,48,376,57,39,190 -32,376,40,384,0,0,0 -40,376,48,384,0,0,0 -793,794,795,796 -48,368,56,376,35,10,212 -56,368,64,376,34,9,211 -48,376,56,384,0,0,0 -56,376,64,384,0,0,0 -798,799,800,801 -791,792,797,802 -752,773,786,803 -64,320,72,328,35,10,212 -72,320,80,328,35,10,212 -64,328,72,336,13,3,79 -72,328,80,336,9,2,61 -805,806,807,808 -80,320,88,328,28,7,171 -88,320,96,328,0,0,6 -80,328,88,336,4,1,28 -88,328,96,336,18,5,115 -810,811,812,813 -64,336,72,344,13,3,78 -72,336,80,344,8,2,53 -64,344,72,352,35,10,212 -72,344,80,352,35,10,212 -815,816,817,818 -80,336,88,344,1,0,10 -88,336,96,344,19,5,120 -80,344,88,352,14,4,91 -88,344,96,352,0,0,2 -820,821,822,823 -809,814,819,824 -96,320,104,328,19,5,118 -104,320,112,328,35,10,212 -96,328,104,336,34,9,211 -104,328,112,336,35,10,212 -826,827,828,829 -112,320,120,328,35,10,212 -120,320,128,328,34,9,211 -112,328,120,336,35,10,212 -120,328,128,336,30,8,185 -831,832,833,834 -96,336,104,344,35,10,212 -104,336,112,344,35,10,212 -96,344,104,352,31,8,192 -104,344,112,352,35,10,212 -836,837,838,839 -112,336,120,344,35,10,212 -120,336,128,344,23,6,142 -112,344,120,352,35,10,212 -120,344,128,352,16,4,100 -841,842,843,844 -830,835,840,845 -64,352,80,368,35,10,212 -80,352,88,360,21,6,131 -88,352,96,360,0,0,0 -80,360,88,368,14,4,92 -88,360,96,368,0,0,2 -848,849,850,851 -64,368,72,376,32,9,198 -72,368,80,376,19,5,121 -64,376,72,384,0,0,0 -72,376,80,384,2,0,17 -853,854,855,856 -80,368,88,376,0,0,4 -88,368,96,376,14,3,90 -80,376,88,384,17,4,111 -88,376,96,384,34,9,209 -858,859,860,861 -847,852,857,862 -96,352,104,360,27,7,167 -104,352,112,360,35,10,212 -96,360,104,368,31,9,195 -104,360,112,368,35,10,212 -864,865,866,867 -112,352,120,360,35,10,212 -120,352,128,360,9,2,58 -112,360,120,368,34,9,211 -120,360,128,368,2,0,15 -869,870,871,872 -96,368,112,384,35,10,212 -112,368,120,376,30,8,185 -120,368,128,376,0,0,0 -112,376,120,384,23,6,142 -120,376,128,384,0,0,0 -875,876,877,878 -868,873,874,879 -825,846,863,880 -718,751,804,881 -128,256,160,288,35,10,212 -160,256,176,272,35,10,212 -176,256,184,264,48,192,50 -184,256,192,264,32,212,10 -176,264,184,272,51,100,144 -184,264,192,272,32,212,10 -885,886,887,888 -160,272,176,288,35,10,212 -176,272,184,280,39,17,211 -184,272,192,280,48,189,53 -176,280,184,288,35,10,212 -184,280,192,288,56,72,177 -891,892,893,894 -884,889,890,895 -128,288,144,304,35,10,212 -144,288,160,304,35,10,212 -128,304,136,312,35,10,212 -136,304,144,312,35,10,212 -128,312,136,320,21,6,129 -136,312,144,320,24,6,147 -899,900,901,902 -144,304,152,312,35,10,212 -152,304,160,312,35,10,212 -144,312,152,320,28,8,174 -152,312,160,320,14,3,87 -904,905,906,907 -897,898,903,908 -160,288,176,304,35,10,212 -176,288,192,304,35,10,212 -160,304,168,312,35,10,212 -168,304,176,312,35,10,212 -160,312,168,320,9,2,62 -168,312,176,320,28,7,171 -912,913,914,915 -176,304,184,312,35,10,212 -184,304,192,312,35,10,212 -176,312,184,320,35,10,212 -184,312,192,320,26,7,162 -917,918,919,920 -910,911,916,921 -883,896,909,922 -192,256,224,288,32,212,10 -224,256,256,288,32,212,10 -192,288,200,296,60,123,133 -200,288,208,296,32,212,10 -192,296,200,304,38,13,212 -200,296,208,304,61,149,109 -926,927,928,929 -208,288,224,304,32,212,10 -192,304,200,312,35,10,212 -200,304,208,312,37,13,211 -192,312,200,320,16,4,101 -200,312,208,320,10,2,68 -932,933,934,935 -208,304,216,312,64,150,112 -216,304,224,312,32,212,10 -208,312,216,320,9,2,61 -216,312,224,320,26,87,26 -937,938,939,940 -930,931,936,941 -224,288,240,304,32,212,10 -240,288,256,304,32,212,10 -224,304,232,312,32,212,10 -232,304,240,312,32,212,10 -224,312,232,320,27,184,8 -232,312,240,320,32,212,10 -945,946,947,948 -240,304,248,312,32,212,10 -248,304,256,312,32,212,10 -240,312,248,320,32,212,10 -248,312,256,320,22,153,7 -950,951,952,953 -943,944,949,954 -924,925,942,955 -128,320,136,328,2,0,15 -136,320,144,328,7,2,51 -128,328,136,336,0,0,0 -136,328,144,336,5,1,38 -957,958,959,960 -144,320,152,328,4,1,28 -152,320,160,328,15,4,96 -144,328,152,336,32,9,197 -152,328,160,336,35,10,212 -962,963,964,965 -128,336,136,344,0,0,0 -136,336,144,344,26,7,162 -128,344,136,352,3,0,23 -136,344,144,352,34,9,211 -967,968,969,970 -144,336,160,352,35,10,212 -961,966,971,972 -160,320,168,328,15,4,96 -168,320,176,328,30,8,188 -160,328,168,336,35,10,212 -168,328,176,336,35,10,212 -974,975,976,977 -176,320,184,328,34,9,208 -184,320,192,328,3,0,23 -176,328,184,336,34,9,208 -184,328,192,336,33,9,206 -979,980,981,982 -160,336,176,352,35,10,212 -176,336,184,344,35,10,212 -184,336,192,344,34,9,211 -176,344,184,352,22,6,141 -184,344,192,352,4,1,29 -985,986,987,988 -978,983,984,989 -128,352,136,360,10,2,66 -136,352,144,360,35,10,212 -128,360,136,368,17,4,108 -136,360,144,368,35,10,212 -991,992,993,994 -144,352,160,368,35,10,212 -128,368,136,376,24,6,149 -136,368,144,376,35,10,212 -128,376,136,384,31,8,192 -136,376,144,384,35,10,212 -997,998,999,1000 -144,368,160,384,35,10,212 -995,996,1001,1002 -160,352,168,360,35,10,212 -168,352,176,360,24,6,151 -160,360,168,368,35,10,212 -168,360,176,368,11,3,71 -1004,1005,1006,1007 -176,352,184,360,0,0,3 -184,352,192,360,20,5,127 -176,360,184,368,7,2,46 -184,360,192,368,35,10,212 -1009,1010,1011,1012 -160,368,168,376,35,10,212 -168,368,176,376,10,2,68 -160,376,168,384,35,10,212 -168,376,176,384,25,7,155 -1014,1015,1016,1017 -176,368,184,376,3,0,24 -184,368,192,376,33,9,203 -176,376,184,384,0,0,3 -184,376,192,384,3,0,21 -1019,1020,1021,1022 -1008,1013,1018,1023 -973,990,1003,1024 -192,320,200,328,12,3,77 -200,320,208,328,17,4,104 -192,328,200,336,35,10,212 -200,328,208,336,35,10,212 -1026,1027,1028,1029 -208,320,216,328,14,4,92 -216,320,224,328,2,0,17 -208,328,216,336,35,10,212 -216,328,224,336,26,7,163 -1031,1032,1033,1034 -192,336,200,344,30,8,186 -200,336,208,344,26,7,165 -192,344,200,352,0,0,5 -200,344,208,352,3,1,23 -1036,1037,1038,1039 -208,336,216,344,26,7,159 -216,336,224,344,22,6,135 -208,344,216,352,4,1,26 -216,344,224,352,2,0,15 -1041,1042,1043,1044 -1030,1035,1040,1045 -224,320,232,328,3,18,1 -232,320,240,328,46,183,44 -224,328,232,336,0,0,0 -232,328,240,336,28,13,145 -1047,1048,1049,1050 -240,320,248,328,32,212,10 -248,320,256,328,18,122,5 -240,328,248,336,55,107,143 -248,328,256,336,40,151,39 -1052,1053,1054,1055 -224,336,232,344,0,0,0 -232,336,240,344,23,6,148 -224,344,232,352,0,0,0 -232,344,240,352,29,8,183 -1057,1058,1059,1060 -240,336,248,344,35,10,212 -248,336,256,344,34,12,199 -240,344,248,352,35,10,212 -248,344,256,352,35,10,212 -1062,1063,1064,1065 -1051,1056,1061,1066 -192,352,200,360,33,9,205 -200,352,208,360,35,10,212 -192,360,200,368,35,10,212 -200,360,208,368,35,10,212 -1068,1069,1070,1071 -208,352,216,360,35,10,212 -216,352,224,360,15,4,94 -208,360,216,368,33,9,203 -216,360,224,368,3,0,21 -1073,1074,1075,1076 -192,368,200,376,35,10,212 -200,368,208,376,33,9,201 -192,376,200,384,8,2,50 -200,376,208,384,2,0,20 -1078,1079,1080,1081 -208,368,216,376,10,2,67 -216,368,224,376,0,0,0 -208,376,216,384,16,4,107 -216,376,224,384,0,0,0 -1083,1084,1085,1086 -1072,1077,1082,1087 -224,352,232,360,2,0,16 -232,352,240,360,34,9,211 -224,360,232,368,9,2,61 -232,360,240,368,35,10,212 -1089,1090,1091,1092 -240,352,256,368,35,10,212 -224,368,232,376,17,4,106 -232,368,240,376,35,10,212 -224,376,232,384,24,6,151 -232,376,240,384,35,10,212 -1095,1096,1097,1098 -240,368,256,384,35,10,212 -1093,1094,1099,1100 -1046,1067,1088,1101 -923,956,1025,1102 -0,384,16,400,255,255,255 -16,384,24,392,255,255,255 -24,384,32,392,210,210,210 -16,392,24,400,255,255,255 -24,392,32,400,255,255,255 -1105,1106,1107,1108 -0,400,16,416,255,255,255 -16,400,32,416,255,255,255 -1104,1109,1110,1111 -32,384,40,392,191,191,191 -40,384,48,392,67,53,167 -32,392,40,400,255,255,255 -40,392,48,400,90,71,222 -1113,1114,1115,1116 -48,384,56,392,26,7,159 -56,384,64,392,26,7,163 -48,392,56,400,35,10,212 -56,392,64,400,35,10,212 -1118,1119,1120,1121 -32,400,40,408,255,255,255 -40,400,48,408,90,71,222 -32,408,40,416,255,255,255 -40,408,48,416,90,71,222 -1123,1124,1125,1126 -48,400,64,416,35,10,212 -1117,1122,1127,1128 -0,416,32,448,255,255,255 -32,416,40,424,255,255,255 -40,416,48,424,90,71,222 -32,424,40,432,255,255,255 -40,424,48,432,90,71,222 -1131,1132,1133,1134 -48,416,64,432,35,10,212 -32,432,40,440,255,255,255 -40,432,48,440,90,71,222 -32,440,40,448,255,255,255 -40,440,48,448,90,71,222 -1137,1138,1139,1140 -48,432,64,448,35,10,212 -1135,1136,1141,1142 -1112,1129,1130,1143 -64,384,128,448,34,9,210 -0,448,32,480,255,255,255 -32,448,40,456,255,255,255 -40,448,48,456,90,71,222 -32,456,40,464,255,255,255 -40,456,48,464,90,71,222 -1147,1148,1149,1150 -48,448,64,464,35,10,212 -32,464,40,472,255,255,255 -40,464,48,472,90,71,222 -32,472,40,480,255,255,255 -40,472,48,480,255,255,255 -1153,1154,1155,1156 -48,464,56,472,35,10,212 -56,464,64,472,35,10,212 -48,472,56,480,255,255,255 -56,472,64,480,255,255,255 -1158,1159,1160,1161 -1151,1152,1157,1162 -0,480,32,512,255,255,255 -32,480,64,512,255,255,255 -1146,1163,1164,1165 -64,448,80,464,35,10,212 -80,448,96,464,35,10,212 -64,464,72,472,35,10,212 -72,464,80,472,35,10,212 -64,472,72,480,255,255,255 -72,472,80,480,255,255,255 -1169,1170,1171,1172 -80,464,88,472,35,10,212 -88,464,96,472,35,10,212 -80,472,88,480,255,255,255 -88,472,96,480,255,255,255 -1174,1175,1176,1177 -1167,1168,1173,1178 -96,448,112,464,35,10,212 -112,448,128,464,35,10,212 -96,464,104,472,35,10,212 -104,464,112,472,35,10,212 -96,472,104,480,255,255,255 -104,472,112,480,255,255,255 -1182,1183,1184,1185 -112,464,120,472,35,10,212 -120,464,128,472,35,10,212 -112,472,120,480,255,255,255 -120,472,128,480,255,255,255 -1187,1188,1189,1190 -1180,1181,1186,1191 -64,480,96,512,255,255,255 -96,480,128,512,255,255,255 -1179,1192,1193,1194 -1144,1145,1166,1195 -128,384,160,416,34,9,211 -160,384,176,400,35,10,212 -176,384,184,392,28,8,175 -184,384,192,392,18,5,116 -176,392,184,400,35,10,212 -184,392,192,400,35,10,212 -1199,1200,1201,1202 -160,400,176,416,35,10,212 -176,400,192,416,35,10,212 -1198,1203,1204,1205 -128,416,160,448,35,10,212 -160,416,192,448,35,10,212 -1197,1206,1207,1208 -192,384,200,392,20,5,127 -200,384,208,392,30,8,188 -192,392,200,400,35,10,212 -200,392,208,400,35,10,212 -1210,1211,1212,1213 -208,384,216,392,32,9,199 -216,384,224,392,26,7,159 -208,392,216,400,35,10,212 -216,392,224,400,35,10,212 -1215,1216,1217,1218 -192,400,208,416,35,10,212 -208,400,224,416,35,10,212 -1214,1219,1220,1221 -224,384,256,416,34,9,211 -192,416,224,448,35,10,212 -224,416,256,448,35,10,212 -1222,1223,1224,1225 -128,448,144,464,35,10,212 -144,448,160,464,35,10,212 -128,464,136,472,35,10,212 -136,464,144,472,35,10,212 -128,472,136,480,255,255,255 -136,472,144,480,255,255,255 -1229,1230,1231,1232 -144,464,152,472,35,10,212 -152,464,160,472,35,10,212 -144,472,152,480,255,255,255 -152,472,160,480,255,255,255 -1234,1235,1236,1237 -1227,1228,1233,1238 -160,448,176,464,35,10,212 -176,448,192,464,35,10,212 -160,464,168,472,35,10,212 -168,464,176,472,35,10,212 -160,472,168,480,255,255,255 -168,472,176,480,255,255,255 -1242,1243,1244,1245 -176,464,184,472,35,10,212 -184,464,192,472,35,10,212 -176,472,184,480,255,255,255 -184,472,192,480,255,255,255 -1247,1248,1249,1250 -1240,1241,1246,1251 -128,480,160,512,255,255,255 -160,480,192,512,255,255,255 -1239,1252,1253,1254 -192,448,208,464,35,10,212 -208,448,224,464,35,10,212 -192,464,200,472,35,10,212 -200,464,208,472,35,10,212 -192,472,200,480,255,255,255 -200,472,208,480,255,255,255 -1258,1259,1260,1261 -208,464,216,472,35,10,212 -216,464,224,472,35,10,212 -208,472,216,480,255,255,255 -216,472,224,480,255,255,255 -1263,1264,1265,1266 -1256,1257,1262,1267 -224,448,240,464,35,10,212 -240,448,256,464,35,10,212 -224,464,232,472,35,10,212 -232,464,240,472,35,10,212 -224,472,232,480,255,255,255 -232,472,240,480,255,255,255 -1271,1272,1273,1274 -240,464,248,472,35,10,212 -248,464,256,472,35,10,212 -240,472,248,480,255,255,255 -248,472,256,480,255,255,255 -1276,1277,1278,1279 -1269,1270,1275,1280 -192,480,224,512,255,255,255 -224,480,256,512,255,255,255 -1268,1281,1282,1283 -1209,1226,1255,1284 -882,1103,1196,1285 -256,256,288,288,32,212,10 -288,256,320,288,32,212,10 -256,288,272,304,32,212,10 -272,288,288,304,32,212,10 -256,304,264,312,32,212,10 -264,304,272,312,32,212,10 -256,312,264,320,17,115,5 -264,312,272,320,32,212,10 -1291,1292,1293,1294 -272,304,288,320,32,212,10 -1289,1290,1295,1296 -288,288,304,304,32,212,10 -304,288,320,304,32,212,10 -288,304,304,320,32,212,10 -304,304,312,312,32,212,10 -312,304,320,312,32,212,10 -304,312,312,320,19,131,6 -312,312,320,320,20,137,6 -1301,1302,1303,1304 -1298,1299,1300,1305 -1287,1288,1297,1306 -320,256,352,288,32,212,10 -352,256,384,288,32,212,10 -320,288,336,304,32,212,10 -336,288,352,304,32,212,10 -320,304,336,320,32,212,10 -336,304,344,312,32,212,10 -344,304,352,312,32,212,10 -336,312,344,320,31,211,9 -344,312,352,320,22,153,6 -1313,1314,1315,1316 -1310,1311,1312,1317 -352,288,368,304,32,212,10 -368,288,384,304,32,212,10 -352,304,360,312,32,212,10 -360,304,368,312,32,212,10 -352,312,360,320,12,82,3 -360,312,368,320,8,61,2 -1321,1322,1323,1324 -368,304,376,312,32,212,10 -376,304,384,312,32,212,10 -368,312,376,320,12,86,3 -376,312,384,320,26,175,8 -1326,1327,1328,1329 -1319,1320,1325,1330 -1308,1309,1318,1331 -256,320,264,328,0,0,0 -264,320,272,328,30,201,9 -256,328,264,336,0,0,0 -264,328,272,336,24,166,7 -1333,1334,1335,1336 -272,320,288,336,32,212,10 -256,336,264,344,0,0,0 -264,336,272,344,32,119,32 -256,344,264,352,4,1,27 -264,344,272,352,14,4,92 -1339,1340,1341,1342 -272,336,280,344,36,212,15 -280,336,288,344,32,212,10 -272,344,280,352,48,37,202 -280,344,288,352,50,94,145 -1344,1345,1346,1347 -1337,1338,1343,1348 -288,320,296,328,32,212,10 -296,320,304,328,25,172,7 -288,328,296,336,31,211,9 -296,328,304,336,7,54,2 -1350,1351,1352,1353 -304,320,312,328,0,1,0 -312,320,320,328,22,152,6 -304,328,312,336,8,61,2 -312,328,320,336,31,211,10 -1355,1356,1357,1358 -288,336,296,344,21,147,6 -296,336,304,344,0,3,0 -288,344,296,352,5,29,5 -296,344,304,352,43,95,37 -1360,1361,1362,1363 -304,336,312,344,26,177,8 -312,336,320,344,32,212,10 -304,344,312,352,52,215,33 -312,344,320,352,32,212,10 -1365,1366,1367,1368 -1354,1359,1364,1369 -256,352,264,360,10,2,65 -264,352,272,360,9,2,57 -256,360,264,368,16,4,105 -264,360,272,368,2,0,20 -1371,1372,1373,1374 -272,352,280,360,35,10,212 -280,352,288,360,19,5,121 -272,360,280,368,32,9,198 -280,360,288,368,2,0,15 -1376,1377,1378,1379 -256,368,264,376,23,6,143 -264,368,272,376,0,0,0 -256,376,264,384,29,8,182 -264,376,272,384,0,0,0 -1381,1382,1383,1384 -272,368,280,376,12,3,78 -280,368,288,376,4,1,31 -272,376,280,384,0,0,0 -280,376,288,384,23,6,147 -1386,1387,1388,1389 -1375,1380,1385,1390 -288,352,296,360,17,17,17 -296,352,304,360,235,235,235 -288,360,296,368,119,117,138 -296,360,304,368,255,255,255 -1392,1393,1394,1395 -304,352,320,368,253,254,253 -288,368,296,376,144,132,228 -296,368,304,376,255,255,255 -288,376,296,384,145,132,233 -296,376,304,384,255,255,255 -1398,1399,1400,1401 -304,368,320,384,255,255,255 -1396,1397,1402,1403 -1349,1370,1391,1404 -320,320,328,328,32,212,10 -328,320,336,328,31,210,9 -320,328,328,336,32,212,10 -328,328,336,336,16,113,5 -1406,1407,1408,1409 -336,320,344,328,12,84,3 -344,320,352,328,0,6,0 -336,328,344,336,1,8,0 -344,328,352,336,24,167,7 -1411,1412,1413,1414 -320,336,328,344,30,203,9 -328,336,336,344,1,12,0 -320,344,328,352,22,149,6 -328,344,336,352,0,0,0 -1416,1417,1418,1419 -336,336,344,344,15,106,4 -344,336,352,344,32,212,10 -336,344,344,352,26,181,8 -344,344,352,352,32,212,10 -1421,1422,1423,1424 -1410,1415,1420,1425 -352,320,360,328,11,81,3 -360,320,368,328,15,103,4 -352,328,360,336,32,212,10 -360,328,368,336,32,212,10 -1427,1428,1429,1430 -368,320,376,328,6,48,2 -376,320,384,328,1,7,0 -368,328,376,336,31,208,9 -376,328,384,336,4,31,1 -1432,1433,1434,1435 -352,336,360,344,32,212,10 -360,336,368,344,32,212,10 -352,344,360,352,48,214,29 -360,344,368,352,80,220,64 -1437,1438,1439,1440 -368,336,376,344,32,212,10 -376,336,384,344,11,77,3 -368,344,376,352,122,228,109 -376,344,384,352,53,82,50 -1442,1443,1444,1445 -1431,1436,1441,1446 -320,352,328,360,132,138,132 -328,352,336,360,0,0,0 -320,360,328,368,144,144,144 -328,360,336,368,0,0,0 -1448,1449,1450,1451 -336,352,344,360,235,248,234 -344,352,352,360,248,253,248 -336,360,344,368,246,246,246 -344,360,352,368,255,255,255 -1453,1454,1455,1456 -320,368,328,376,203,203,203 -328,368,336,376,0,0,0 -320,376,328,384,255,255,255 -328,376,336,384,110,110,110 -1458,1459,1460,1461 -336,368,344,376,154,154,154 -344,368,352,376,255,255,255 -336,376,344,384,1,1,1 -344,376,352,384,52,52,52 -1463,1464,1465,1466 -1452,1457,1462,1467 -352,352,368,368,255,255,255 -368,352,376,360,254,254,254 -376,352,384,360,42,42,42 -368,360,376,368,191,191,191 -376,360,384,368,0,0,0 -1470,1471,1472,1473 -352,368,360,376,255,255,255 -360,368,368,376,212,212,212 -352,376,360,384,53,53,53 -360,376,368,384,3,3,3 -1475,1476,1477,1478 -368,368,376,376,29,29,29 -376,368,384,376,84,84,84 -368,376,376,384,85,85,85 -376,376,384,384,245,245,245 -1480,1481,1482,1483 -1469,1474,1479,1484 -1426,1447,1468,1485 -1307,1332,1405,1486 -384,256,416,288,32,212,10 -416,256,448,288,32,212,10 -384,288,416,320,32,212,10 -416,288,432,304,32,212,10 -432,288,448,304,32,212,10 -416,304,432,320,32,212,10 -432,304,440,312,32,212,10 -440,304,448,312,32,212,10 -432,312,440,320,34,212,12 -440,312,448,320,145,232,136 -1494,1495,1496,1497 -1491,1492,1493,1498 -1488,1489,1490,1499 -448,256,464,272,32,212,10 -464,256,480,272,32,212,10 -448,272,464,288,32,212,10 -464,272,472,280,32,212,10 -472,272,480,280,56,216,37 -464,280,472,288,32,212,11 -472,280,480,288,188,241,182 -1504,1505,1506,1507 -1501,1502,1503,1508 -480,256,488,264,50,215,31 -488,256,496,264,248,253,248 -480,264,488,272,147,233,137 -488,264,496,272,255,255,255 -1510,1511,1512,1513 -496,256,512,272,255,255,255 -480,272,488,280,244,252,243 -488,272,496,280,255,255,255 -480,280,488,288,255,255,255 -488,280,496,288,255,255,255 -1516,1517,1518,1519 -496,272,512,288,255,255,255 -1514,1515,1520,1521 -448,288,456,296,32,212,10 -456,288,464,296,32,212,10 -448,296,456,304,32,212,10 -456,296,464,304,98,215,85 -1523,1524,1525,1526 -464,288,472,296,63,148,53 -472,288,480,296,193,193,193 -464,296,472,304,2,3,2 -472,296,480,304,126,126,126 -1528,1529,1530,1531 -448,304,456,312,112,226,99 -456,304,464,312,195,198,194 -448,312,456,320,253,254,253 -456,312,464,320,149,149,149 -1533,1534,1535,1536 -464,304,472,312,0,0,0 -472,304,480,312,174,174,174 -464,312,472,320,0,0,0 -472,312,480,320,225,225,225 -1538,1539,1540,1541 -1527,1532,1537,1542 -480,288,512,320,255,255,255 -1509,1522,1543,1544 -384,320,392,328,25,169,7 -392,320,400,328,32,212,10 -384,328,392,336,9,67,2 -392,328,400,336,32,212,10 -1546,1547,1548,1549 -400,320,408,328,32,212,10 -408,320,416,328,32,212,10 -400,328,408,336,32,212,10 -408,328,416,336,53,215,34 -1551,1552,1553,1554 -384,336,392,344,6,34,3 -392,336,400,344,86,221,70 -384,344,392,352,54,54,54 -392,344,400,352,255,255,255 -1556,1557,1558,1559 -400,336,408,344,171,238,164 -408,336,416,344,248,253,247 -400,344,408,352,255,255,255 -408,344,416,352,255,255,255 -1561,1562,1563,1564 -1550,1555,1560,1565 -416,320,424,328,32,212,10 -424,320,432,328,67,218,49 -416,328,424,336,158,235,150 -424,328,432,336,249,253,248 -1567,1568,1569,1570 -432,320,440,328,202,244,198 -440,320,448,328,255,255,255 -432,328,440,336,255,255,255 -440,328,448,336,255,255,255 -1572,1573,1574,1575 -416,336,432,352,255,255,255 -432,336,448,352,255,255,255 -1571,1576,1577,1578 -384,352,392,360,103,103,103 -392,352,400,360,255,255,255 -384,360,392,368,191,191,191 -392,360,400,368,255,255,255 -1580,1581,1582,1583 -400,352,416,368,255,255,255 -384,368,400,384,254,254,254 -400,368,416,384,255,255,255 -1584,1585,1586,1587 -416,352,448,384,254,254,254 -1566,1579,1588,1589 -448,320,456,328,255,255,255 -456,320,464,328,99,99,99 -448,328,456,336,255,255,255 -456,328,464,336,49,49,49 -1591,1592,1593,1594 -464,320,472,328,19,19,19 -472,320,480,328,254,254,254 -464,328,472,336,69,69,69 -472,328,480,336,255,255,255 -1596,1597,1598,1599 -448,336,456,344,253,253,253 -456,336,464,344,11,11,11 -448,344,456,352,229,229,229 -456,344,464,352,0,0,0 -1601,1602,1603,1604 -464,336,472,344,130,130,130 -472,336,480,344,255,255,255 -464,344,472,352,195,195,195 -472,344,480,352,255,255,255 -1606,1607,1608,1609 -1595,1600,1605,1610 -480,320,512,352,255,255,255 -448,352,456,360,229,229,229 -456,352,464,360,127,127,127 -448,360,456,368,255,255,255 -456,360,464,368,255,255,255 -1613,1614,1615,1616 -464,352,472,360,249,249,249 -472,352,480,360,255,255,255 -464,360,472,368,255,255,255 -472,360,480,368,255,255,255 -1618,1619,1620,1621 -448,368,456,376,102,102,102 -456,368,464,376,114,114,114 -448,376,456,384,12,12,12 -456,376,464,384,109,109,109 -1623,1624,1625,1626 -464,368,480,384,255,255,255 -1617,1622,1627,1628 -480,352,512,384,255,255,255 -1611,1612,1629,1630 -1500,1545,1590,1631 -256,384,264,392,34,9,210 -264,384,272,392,26,7,159 -256,392,264,400,35,10,212 -264,392,272,400,35,10,212 -1633,1634,1635,1636 -272,384,280,392,26,7,161 -280,384,288,392,34,9,211 -272,392,280,400,35,10,212 -280,392,288,400,35,10,212 -1638,1639,1640,1641 -256,400,272,416,35,10,212 -272,400,288,416,35,10,212 -1637,1642,1643,1644 -288,384,296,392,145,132,233 -296,384,304,392,255,255,255 -288,392,296,400,145,132,233 -296,392,304,400,255,255,255 -1646,1647,1648,1649 -304,384,320,400,255,255,255 -288,400,296,408,145,132,233 -296,400,304,408,255,255,255 -288,408,296,416,145,132,233 -296,408,304,416,255,255,255 -1652,1653,1654,1655 -304,400,320,416,255,255,255 -1650,1651,1656,1657 -256,416,288,448,35,10,212 -288,416,296,424,145,132,233 -296,416,304,424,255,255,255 -288,424,296,432,145,132,233 -296,424,304,432,255,255,255 -1660,1661,1662,1663 -304,416,320,432,255,255,255 -288,432,296,440,145,132,233 -296,432,304,440,255,255,255 -288,440,296,448,145,132,233 -296,440,304,448,255,255,255 -1666,1667,1668,1669 -304,432,320,448,255,255,255 -1664,1665,1670,1671 -1645,1658,1659,1672 -320,384,336,400,254,254,254 -336,384,344,392,196,196,196 -344,384,352,392,140,140,140 -336,392,344,400,255,255,255 -344,392,352,400,255,255,255 -1675,1676,1677,1678 -320,400,336,416,255,255,255 -336,400,352,416,255,255,255 -1674,1679,1680,1681 -352,384,360,392,147,147,147 -360,384,368,392,207,207,207 -352,392,360,400,255,255,255 -360,392,368,400,255,255,255 -1683,1684,1685,1686 -368,384,384,400,254,254,254 -352,400,368,416,255,255,255 -368,400,384,416,255,255,255 -1687,1688,1689,1690 -320,416,352,448,255,255,255 -352,416,384,448,255,255,255 -1682,1691,1692,1693 -256,448,272,464,35,10,212 -272,448,288,464,35,10,212 -256,464,264,472,35,10,212 -264,464,272,472,35,10,212 -256,472,264,480,255,255,255 -264,472,272,480,255,255,255 -1697,1698,1699,1700 -272,464,280,472,35,10,212 -280,464,288,472,35,10,212 -272,472,280,480,255,255,255 -280,472,288,480,255,255,255 -1702,1703,1704,1705 -1695,1696,1701,1706 -288,448,296,456,145,132,233 -296,448,304,456,255,255,255 -288,456,296,464,145,132,233 -296,456,304,464,255,255,255 -1708,1709,1710,1711 -304,448,320,464,255,255,255 -288,464,296,472,145,132,233 -296,464,304,472,255,255,255 -288,472,296,480,255,255,255 -296,472,304,480,255,255,255 -1714,1715,1716,1717 -304,464,320,480,255,255,255 -1712,1713,1718,1719 -256,480,288,512,255,255,255 -288,480,320,512,255,255,255 -1707,1720,1721,1722 -320,448,384,512,255,255,255 -1673,1694,1723,1724 -384,384,512,512,254,254,254 -1487,1632,1725,1726 -456,681,1286,1727 diff --git a/Projet/src/bloc.py b/Projet/src/bloc.py index 17167fea46d75270894507b81f388d729cd69621..ca0e04ac51e91953b96312119f02b31f42dd2a4a 100755 --- a/Projet/src/bloc.py +++ b/Projet/src/bloc.py @@ -14,15 +14,24 @@ from PIL import Image, ImageDraw from manip_couleurs import * class Bloc: - """Classe d'un bloc d'une image en pixel """ + Classe d'un bloc d'une image en pixel + Exemple(s) : + $$$ self.pixel_hl = (0, 0) + $$$ self.pixel_lr = (10, 10) + $$$ self.color = (255, 0, 0) + $$$ self.bloc = Bloc(self.pixel_hl, self.pixel_lr, self.color) + """ + - def __init__(self, pixel_hl, pixel_lr): + def __init__(self, pixel_hl: tuple[int, int], pixel_lr: tuple[int, int], color:tuple[int, int, int]): """ Initialise le type bloc à la valeur de l'image """ + # self.pixel_hl = pixel_hl self.pixel_lr = pixel_lr + self.color = color def __eq__(self, other): """ @@ -42,12 +51,12 @@ class Bloc: $$$ """ - return est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0]), moyenne_couleur_bloc(liste_bloc[1])) and \ - est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0]), moyenne_couleur_bloc(liste_bloc[2])) and \ - est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0]), moyenne_couleur_bloc(liste_bloc[3])) + return est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[1].color)) and est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[2].color)) and est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[3].color)) +# est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[1].color)) +# est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[2].color)) +# est_couleur_proche(moyenne_couleur_bloc(liste_bloc[0].color), moyenne_couleur_bloc(liste_bloc[3].color)) - - def est_bloc_non_uniforme()-> bool: + def est_bloc_non_uniforme(liste_bloc: : list[Bloc, Bloc, Bloc, Bloc])-> bool: """ Renvoie True si le bloc n'est pas uniforme, c'est à dire si il peut être divisé en 4 blocs @@ -56,9 +65,9 @@ class Bloc: $$$ """ - return not(est_bloc_uniforme()) + return not(est_bloc_uniforme(liste_bloc)) - def sont_4_blocs_uniformes_proches(liste_bloc: list[Bloc, Bloc, Bloc, Bloc])-> bool: + def sont_4_blocs_uniformes_proches(liste_bloc: : list[Bloc, Bloc, Bloc, Bloc])-> bool: """ Renvoie True si les 4 blocs uniformes sont proches Précondition : aucune @@ -76,7 +85,7 @@ class Bloc: return res - def en_4_blocs(bloc:Bloc)->bloc: + def en_4_blocs(bloc: Bloc)->Bloc: """ Divise un bloc en 4 blocs Précondition : aucune @@ -84,16 +93,44 @@ class Bloc: $$$ """ - bloc1 = pixel_hl = image.getpixel((0, 0)) and \ - pixel_lr = image.getpixel((largeur/2, hauteur/2)) - bloc2 = pixel_hl = image.getpixel((largeur/2, 0)) and \ - pixel_lr = image.getpixel((largeur, hauteur/2)) - bloc3 = pixel_hl = image.getpixel((0, hauteur/2)) and \ - pixel_lr = image.getpixel((largeur/2, hauteur)) - bloc4 = pixel_hl = image.getpixel((largeur/2, hauteur/2)) and \ - pixel_lr = image.getpixel((largeur, hauteur)) - new_bloc = [bloc1, bloc2, bloc3, bloc4] - return new_bloc + # Obtenez les coordonnées du coin supérieur gauche et du coin inférieur droit du bloc + x_hl, y_hl = bloc.pixel_hl + x_lr, y_lr = bloc.pixel_lr + + # Calculez les coordonnées du milieu du bloc + x_milieu = (x_hl + x_lr) // 2 + y_milieu = (y_hl + y_lr) // 2 + + # Obtenez les couleurs des pixels pour les 4 coins du bloc + couleur_bloc1 = bloc.getpixel((x_hl, y_hl)) + couleur_bloc2 = bloc.getpixel((x_milieu, y_hl)) + couleur_bloc3 = bloc.getpixel((x_hl, y_milieu)) + couleur_bloc4 = bloc.getpixel((x_milieu, y_milieu)) + + # Créez les 4 nouveaux blocs à partir des pixels obtenus + bloc1 = Bloc((x_hl, y_hl), (x_milieu, y_milieu)) + bloc1.pixel_couleur = couleur_bloc1 + + bloc2 = Bloc((x_milieu, y_hl), (x_lr, y_milieu)) + bloc2.pixel_couleur = couleur_bloc2 + + bloc3 = Bloc((x_hl, y_milieu), (x_milieu, y_lr)) + bloc3.pixel_couleur = couleur_bloc3 + + bloc4 = Bloc((x_milieu, y_milieu), (x_lr, y_lr)) + bloc4.pixel_couleur = couleur_bloc4 + + # Retourner une liste contenant les 4 nouveaux blocs + return [bloc1, bloc2, bloc3, bloc4] + + + +# bloc1 = pixel_hl = image.getpixel((0, 0)) and pixel_lr = image.getpixel((largeur/2, hauteur/2)) +# bloc2 = pixel_hl = image.getpixel((largeur/2, 0)) and pixel_lr = image.getpixel((largeur, hauteur/2)) +# bloc3 = pixel_hl = image.getpixel((0, hauteur/2)) and pixel_lr = image.getpixel((largeur/2, hauteur)) +# bloc4 = pixel_hl = image.getpixel((largeur/2, hauteur/2)) and pixel_lr = image.getpixel((largeur, hauteur)) +# new_bloc = [bloc1, bloc2, bloc3, bloc4] +# return new_bloc diff --git a/Projet/src/csv_en_png.py b/Projet/src/csv_en_png.py index 704765db572973baf7ea183ef029f6aaef9186a6..00071a3e13731ecac404d1a7d94593f62b648e8d 100755 --- a/Projet/src/csv_en_png.py +++ b/Projet/src/csv_en_png.py @@ -14,7 +14,7 @@ import csv from PIL import Image, ImageDraw max_y2 = 0 -fichier_csv = "../assets/mystere.csv" +fichier_csv = input("Entrez le chemin du fichier : ") # Récupère la valeur maximale compris dans la 4eme colonne pour obtenir la dimension max de l'image with open(fichier_csv, newline='') as csvfile: @@ -25,7 +25,7 @@ with open(fichier_csv, newline='') as csvfile: if y2 > max_y2: y2 = max_y2 -width, height = 512, 512 #max_y2, max_y2 +width, height = 512, 512 #max_y2, max_y2 ne marche pas image = Image.new("RGB", (width, height), "black") draw = ImageDraw.Draw(image)