From f8a377cbf6aec8584495c5db99913095175a1971 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 6 Sep 2015 14:54:58 +0200 Subject: [PATCH] set README.md --- README.md | 2 -- blue.bmp | Bin 0 -> 126 bytes bmp.py | 24 ++++++++++++++++++++++++ dep.py | 3 +++ dep.pyc | Bin 0 -> 158 bytes green.bmp | Bin 0 -> 126 bytes red.bmp | Bin 0 -> 126 bytes test.bmp | Bin 0 -> 170 bytes 8 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 blue.bmp create mode 100644 bmp.py create mode 100644 dep.py create mode 100644 dep.pyc create mode 100644 green.bmp create mode 100644 red.bmp create mode 100644 test.bmp diff --git a/README.md b/README.md index 20f89d1..27a9c08 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,2 @@ # bmp_python Traitement d'image bmp en python - -Test pull diff --git a/blue.bmp b/blue.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0bcd5c5e5094d5023f335f2f077ead139369088d GIT binary patch literal 126 ucmZ?rtz&?IDj<~u#Eft(0hV9^lET~&3>E+qPVPa)FgCF?6Pm*RKt2Fz>;#?w literal 0 HcmV?d00001 diff --git a/bmp.py b/bmp.py new file mode 100644 index 0000000..6251926 --- /dev/null +++ b/bmp.py @@ -0,0 +1,24 @@ +# ~*~ encoding: utf-8 ~*~ # +########################### +# TRAITEMENT D'IMAGES # +########################### + +import dep +import sys + +tmp = "" +header = "" +content = "" + + +with open(sys.argv[1]) as f: + for byte in f.read(): + tmp += str( hex( ord(byte) ) )[2:] + "," + +headerSize = ( 14 + 9 ) * 8 +header = tmp[:headerSize] +content = tmp[headerSize:] + +print header +print +print content \ No newline at end of file diff --git a/dep.py b/dep.py new file mode 100644 index 0000000..2ac2fe0 --- /dev/null +++ b/dep.py @@ -0,0 +1,3 @@ +# ~*~ encoding: utf-8 ~*~ # +########################### + diff --git a/dep.pyc b/dep.pyc new file mode 100644 index 0000000000000000000000000000000000000000..434ba36adfbf62db4e6927b98302a77fef4394ba GIT binary patch literal 158 zcmZSn%*)lK`zAD*0SXv_v;zK3rkb=lX466 cQ&J1`3MxxDfM(g`=BJeAq}qXOECyl*0CJincK`qY literal 0 HcmV?d00001 diff --git a/green.bmp b/green.bmp new file mode 100644 index 0000000000000000000000000000000000000000..48536de1cd217104ed917bacd4b47fc0bbbb47bb GIT binary patch literal 126 ucmZ?rtz&?IDj<~u#Eft(0hV9^lET~&3>E+qPVPa)FgCF?6S~6x3=9Bh?F60x literal 0 HcmV?d00001 diff --git a/red.bmp b/red.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5d25b0a51fc1c0e0d128acc0101bb413feee72ec GIT binary patch literal 126 tcmZ?rtz&?IDj<~u#Eft(0hV9^lET~&3>E+qPVPa)FgCF?6NbY73;<{D1fBo@ literal 0 HcmV?d00001 diff --git a/test.bmp b/test.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0b2fe5d7b8b18009de7cfae21b8541b5553db332 GIT binary patch literal 170 zcmZ?rUBv(aRX{2Sh*_YRkwF41VE`nBxgi)V03@8;gNk8nVreEch5umyB<>C4fM^B= Q5b?j90muRZAQQv_0FpN$q5uE@ literal 0 HcmV?d00001