Progress
85
Day 6/Piet'ers Gallery.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Piet'ers Gallery</title>
|
||||
|
||||
<link rel="stylesheet" href="Piet'ers%20Gallery_files/bootstrap.css">
|
||||
<link href="Piet'ers%20Gallery_files/css.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="Piet'ers%20Gallery_files/baguetteBox.css">
|
||||
<link rel="stylesheet" href="Piet'ers%20Gallery_files/styles.css">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container gallery-container">
|
||||
|
||||
<h1>Piet'ers Gallery</h1>
|
||||
|
||||
<p class="page-description text-center">We currently don't plan on selling any artwork!</p>
|
||||
|
||||
<div class="tz-gallery">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/house.png">
|
||||
<img src="Piet'ers%20Gallery_files/house.png" alt="House">
|
||||
<p style="color:grey;">"House" - 3200$</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/trees.png">
|
||||
<img src="Piet'ers%20Gallery_files/trees.png" alt="Trees">
|
||||
<p style="color:grey;">"Trees" - 4200$</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/lake.png">
|
||||
<img src="Piet'ers%20Gallery_files/lake.png" alt="lake">
|
||||
<p style="color:grey;">Lake" - 8500$</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/sky.png">
|
||||
<img src="Piet'ers%20Gallery_files/sky.png" alt="Sky">
|
||||
<p style="color:grey;">"Sky" - 5000$</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/sheep.png">
|
||||
<img src="Piet'ers%20Gallery_files/sheep.png" alt="Sheep">
|
||||
<p style="color:grey;">"Sheep" - 4030$</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<a class="lightbox" href="https://hackvent.hacking-lab.com/Mondrian-Gallery/img/snake.png">
|
||||
<img src="Piet'ers%20Gallery_files/snake.png" alt="Snake">
|
||||
<p style="color:grey;">"Snake" - 6030$</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="Piet'ers%20Gallery_files/baguetteBox.js"></script>
|
||||
<script>
|
||||
baguetteBox.run('.tz-gallery');
|
||||
</script><div role="dialog" id="baguetteBox-overlay" style="background-color: rgba(0, 0, 0, 0.8); display: none;" aria-labelledby="baguetteBox-figure-0 baguetteBox-figure-1 baguetteBox-figure-2 baguetteBox-figure-3 baguetteBox-figure-4 baguetteBox-figure-5" aria-describedby="baguetteBox-figcaption-0 baguetteBox-figcaption-1 baguetteBox-figcaption-2 baguetteBox-figcaption-3 baguetteBox-figcaption-4 baguetteBox-figcaption-5" class=""><div id="baguetteBox-slider" style="transform: translate3d(-300%, 0px, 0px);"><div class="full-image" id="baguette-img-0"></div><div class="full-image" id="baguette-img-1"><figure id="baguetteBox-figure-1"><img src="Piet'ers%20Gallery_files/trees.png" alt="Trees"></figure></div><div class="full-image" id="baguette-img-2"><figure id="baguetteBox-figure-2"><img src="Piet'ers%20Gallery_files/lake.png" alt="lake"></figure></div><div class="full-image" id="baguette-img-3"><figure id="baguetteBox-figure-3"><img src="Piet'ers%20Gallery_files/sky.png" alt="Sky"></figure></div><div class="full-image" id="baguette-img-4"><figure id="baguetteBox-figure-4"><img src="Piet'ers%20Gallery_files/sheep.png" alt="Sheep"></figure></div><div class="full-image" id="baguette-img-5"><figure id="baguetteBox-figure-5"><img src="Piet'ers%20Gallery_files/snake.png" alt="Snake"></figure></div></div><button type="button" id="previous-button" aria-label="Previous" class="baguetteBox-button"><svg width="44" height="60"><polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,0.5)" stroke-width="4" stroke-linecap="butt" fill="none" stroke-linejoin="round"></polyline></svg></button><button type="button" id="next-button" aria-label="Next" class="baguetteBox-button"><svg width="44" height="60"><polyline points="14 10 34 30 14 50" stroke="rgba(255,255,255,0.5)" stroke-width="4" stroke-linecap="butt" fill="none" stroke-linejoin="round"></polyline></svg></button><button type="button" id="close-button" aria-label="Close" class="baguetteBox-button"><svg width="30" height="30"><g stroke="rgb(160,160,160)" stroke-width="4"><line x1="5" y1="5" x2="25" y2="25"></line><line x1="5" y1="25" x2="25" y2="5"></line></g></svg></button></div>
|
||||
<script src="Piet'ers%20Gallery_files/script.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
<!-- Mady with <3 by https://twitter.com/xorkiwi -->
|
||||
6
Day 6/Piet'ers Gallery_files/baguetteBox.css
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* baguetteBox.js
|
||||
* @author feimosi
|
||||
* @version 1.8.1
|
||||
* @url https://github.com/feimosi/baguetteBox.js
|
||||
*/#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@-webkit-keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}@keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}}
|
||||
7
Day 6/Piet'ers Gallery_files/baguetteBox.js
Normal file
6
Day 6/Piet'ers Gallery_files/bootstrap.css
vendored
Normal file
16
Day 6/Piet'ers Gallery_files/css.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Droid Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Droid Sans Regular'), local('DroidSans-Regular'), url(https://fonts.gstatic.com/s/droidsans/v8/SlGVmQWMvZQIdix7AFxXkHNSbQ.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Droid Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url(https://fonts.gstatic.com/s/droidsans/v8/SlGWmQWMvZQIdix7AFxXmMh3eDs1Zw.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
BIN
Day 6/Piet'ers Gallery_files/house.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Day 6/Piet'ers Gallery_files/house_2.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Day 6/Piet'ers Gallery_files/lake.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
1
Day 6/Piet'ers Gallery_files/script.js
Normal file
@@ -0,0 +1 @@
|
||||
var _0x4ec1=['\x6c\x6f\x67','\x53\x75\x63\x68\x20\x68\x61\x78\x78\x6f\x72\x20\x2d\x20\x6d\x75\x63\x68\x20\x31\x33\x33\x37\x21'];var _0x1a98=function(_0x35db43,_0x135584){_0x35db43=_0x35db43-0x0;var _0x292945=_0x4ec1[_0x35db43];return _0x292945;};console[_0x1a98('0x0')](_0x1a98('0x1'));
|
||||
BIN
Day 6/Piet'ers Gallery_files/sheep.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
Day 6/Piet'ers Gallery_files/sky.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Day 6/Piet'ers Gallery_files/snake.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
86
Day 6/Piet'ers Gallery_files/styles.css
Normal file
@@ -0,0 +1,86 @@
|
||||
body {
|
||||
background-color: #434c50;
|
||||
min-height: 100vh;
|
||||
font: normal 16px sans-serif;
|
||||
padding: 40px 0;
|
||||
}
|
||||
|
||||
.container.gallery-container {
|
||||
background-color: #fff;
|
||||
color: #35373a;
|
||||
min-height: 100vh;
|
||||
padding: 30px 50px;
|
||||
}
|
||||
|
||||
.gallery-container h1 {
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
font-family: 'Droid Sans', sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.gallery-container p.page-description {
|
||||
text-align: center;
|
||||
margin: 25px auto;
|
||||
font-size: 18px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tz-gallery {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
/* Override bootstrap column paddings */
|
||||
.tz-gallery .row > div {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.tz-gallery .lightbox img {
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tz-gallery .lightbox:before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -13px;
|
||||
margin-left: -13px;
|
||||
opacity: 0;
|
||||
color: #fff;
|
||||
font-size: 26px;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
content: '\e003';
|
||||
pointer-events: none;
|
||||
z-index: 9000;
|
||||
transition: 0.4s;
|
||||
}
|
||||
|
||||
|
||||
.tz-gallery .lightbox:after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
background-color: rgba(46, 132, 206, 0.7);
|
||||
content: '';
|
||||
transition: 0.4s;
|
||||
}
|
||||
|
||||
.tz-gallery .lightbox:hover:after,
|
||||
.tz-gallery .lightbox:hover:before {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.baguetteBox-button {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
@media(max-width: 768px) {
|
||||
body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
BIN
Day 6/Piet'ers Gallery_files/trees.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
228
Day 6/decode.py
Normal file
@@ -0,0 +1,228 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from PIL import Image
|
||||
import math
|
||||
import numpy
|
||||
|
||||
def to24Bit(data):
|
||||
red = (data >> 5) * 32;
|
||||
green = ((data & 28) >> 2) * 32;
|
||||
blue = (data & 3) * 64;
|
||||
return [red, green, blue]
|
||||
|
||||
def to8Bit(pixel):
|
||||
# return (math.floor((pixel[0] / 32)) << 5) + (math.floor((pixel[1] / 32)) << 2) + math.floor((pixel[2] / 64))
|
||||
return (pixel[0] * 7 // 255) << 5 + (pixel[1] * 7 // 255) << 2 + (pixel[2] * 3 // 255)
|
||||
|
||||
images = ["house", "trees", "lake", "sky", "sheep", "snake"]
|
||||
tileSize = 10
|
||||
|
||||
|
||||
im = Image.open("Piet'ers Gallery_files/house.png")
|
||||
pix = im.load()
|
||||
numTiles = im.size[0] // tileSize
|
||||
|
||||
for y in range(im.size[1] - 2 * tileSize):
|
||||
line = ""
|
||||
for x in range(im.size[0] - 2 * tileSize):
|
||||
x_abs = x + tileSize
|
||||
y_abs = y + tileSize
|
||||
|
||||
pixelX = min(math.floor(x_abs / tileSize) * tileSize + 5, im.size[0] - 5)
|
||||
pixelY = min(math.floor(y_abs / tileSize) * tileSize + 5, im.size[1] - 5)
|
||||
|
||||
pixels = [
|
||||
pix[5, pixelY],
|
||||
pix[im.size[0] - 5, pixelY],
|
||||
pix[pixelX, 5],
|
||||
pix[pixelX, im.size[1] - 5]
|
||||
]
|
||||
|
||||
result = ((pixels[0] | pixels[1]) & (pixels[2] | pixels[3]))
|
||||
pix[x_abs, y_abs] = result
|
||||
|
||||
for tileY in range(numTiles):
|
||||
line = ""
|
||||
for tileX in range(numTiles):
|
||||
p = pix[tileX * tileSize + 5, tileY * tileSize + 5]
|
||||
# line += "%08d " % int(bin(p)[2:])
|
||||
line += chr(p)
|
||||
print(line)
|
||||
|
||||
im.save("test.png")
|
||||
|
||||
# def decodePixel(x, y, tileSize):
|
||||
# # x_abs = x*tileSize + tileSize // 2
|
||||
# # y_abs = y*tileSize + tileSize // 2
|
||||
# pixel = pix[x, y]
|
||||
#
|
||||
# return pixel
|
||||
# return "%02d" % pixel
|
||||
# r = pixel[0]
|
||||
# g = pixel[1]
|
||||
# b = pixel[2]
|
||||
# bit8 = to8Bit(pixel)
|
||||
|
||||
# return colors[pixel]
|
||||
# r = 1 if r == 192 else (10 if r == 255 else r)
|
||||
# g = 1 if g == 192 else (10 if g == 255 else g)
|
||||
# b = 1 if b == 192 else (10 if b == 255 else b)
|
||||
|
||||
# return "%02d%02d%02d" % (r, g, b)
|
||||
# return "%02d" % pixel
|
||||
# return "%08d" % int(bin(bit8)[2:])
|
||||
|
||||
# What to do with this pixel?
|
||||
# return bin(pixel)[2:]
|
||||
# return "%04d" % int(bin(pixel)[2:])
|
||||
# return str(chr(ord('A') + pixel))
|
||||
# return pix[x,y]
|
||||
|
||||
# for imageName in images:
|
||||
# im = Image.open("Piet'ers Gallery_files/%s.png" % imageName)
|
||||
# pix = im.load()
|
||||
#
|
||||
# tileSize = 10
|
||||
# tilesW = im.size[0] // tileSize
|
||||
# tilesH = im.size[1] // tileSize
|
||||
# #
|
||||
# data = []
|
||||
#
|
||||
# # First row
|
||||
# for x in range(tilesW):
|
||||
# data.append(decodePixel(x, 0, tileSize))
|
||||
#
|
||||
# # Column right
|
||||
# for y in range(1, tilesH - 1):
|
||||
# data.append(decodePixel(tilesW - 1, y, tileSize))
|
||||
#
|
||||
# # Row bottom
|
||||
# for x in reversed(range(tilesW - 1)):
|
||||
# data.append(decodePixel(x, tilesH - 1, tileSize))
|
||||
#
|
||||
# # Column left
|
||||
# for y in reversed(range(1, tilesH - 1)):
|
||||
# data.append(decodePixel(0, y, tileSize))
|
||||
#
|
||||
# # print(''.join(data))
|
||||
# print(imageName, "\t", ' '.join(data))
|
||||
|
||||
# for
|
||||
# im = Image.open("Piet'ers Gallery_files/lake.png")
|
||||
# im = Image.open("Piet'ers Gallery_files/house_2.png")
|
||||
# im = Image.frombytes('P', im.size, im.tobytes())
|
||||
|
||||
# for imageName in images:
|
||||
# im = Image.open("Piet'ers Gallery_files/%s.png" % imageName)
|
||||
# pix = im.load()
|
||||
#
|
||||
# tileSize = 10
|
||||
# tilesW = im.size[0] // tileSize
|
||||
# tilesH = im.size[1] // tileSize
|
||||
|
||||
# for y in range(im.size[1] - 2 * tileSize):
|
||||
# line = ""
|
||||
# for x in range(im.size[0] - 2 * tileSize):
|
||||
# x_abs = x + tileSize
|
||||
# y_abs = y + tileSize
|
||||
#
|
||||
# pixelX = min(math.floor(x_abs / tileSize) * tileSize + 5, im.size[0] - 5)
|
||||
# pixelY = min(math.floor(y_abs / tileSize) * tileSize + 5, im.size[1] - 5)
|
||||
#
|
||||
# pixels = [
|
||||
# pix[5, pixelY],
|
||||
# pix[im.size[0] - 5, pixelY],
|
||||
# pix[pixelX, 5],
|
||||
# pix[pixelX, im.size[1] - 5]
|
||||
# ]
|
||||
#
|
||||
# result = (pixels[0] ^ pixels[1] ^ pixels[2] ^ pixels[3]) % 18
|
||||
# line += str(result)
|
||||
#
|
||||
# print(pixels)
|
||||
|
||||
# pixelX = 5 if (x_abs < im.size[0] // 2) else im.size[0] - 5
|
||||
# pixelY = 5 if (y_abs < im.size[1] // 2) else im.size[1] - 5
|
||||
|
||||
# print("pixelX, pixelY", pixelX, pixelY, x, y)
|
||||
# print("asdas", x, y)
|
||||
# pixel1 = decodePixel(pixelX, , tileSize)
|
||||
# pixel2 = decodePixel(math.floor(x_abs / tileSize) * tileSize, pixelY, tileSize)
|
||||
|
||||
# pix[x_abs, y_abs] = result
|
||||
# print(line)
|
||||
#
|
||||
# im.save("%s_decoded.png" % imageName)
|
||||
|
||||
# data = []
|
||||
#
|
||||
# # First row
|
||||
# for x in range(tilesW):
|
||||
# data.append(decodePixel(x, 0))
|
||||
#
|
||||
# # Column right
|
||||
# for y in range(1, tilesH - 1):
|
||||
# data.append(decodePixel(tilesW - 1, y))
|
||||
#
|
||||
# # Row bottom
|
||||
# for x in reversed(range(tilesW - 1)):
|
||||
# data.append(decodePixel(x, tilesH - 1))
|
||||
#
|
||||
# # Column left
|
||||
# for y in reversed(range(1, tilesH - 1)):
|
||||
# data.append(decodePixel(0, y))
|
||||
# #
|
||||
# print(''.join(data))
|
||||
# print(len(''.join(data)))
|
||||
|
||||
# for x in range(tilesW):
|
||||
# data.append(decodePixel(x, 0))
|
||||
|
||||
# pixel = numpy.array(im)
|
||||
|
||||
# print(bin(pix[4*tileSize + 5,0]))
|
||||
|
||||
# data = [[0 for x in range(tilesW)] for y in range(tilesH)]
|
||||
|
||||
# for y in range(tilesH):
|
||||
# line = ""
|
||||
# for x in range(tilesW):
|
||||
# # pixel = im.getpixel((x * tileSize + 5, y * tileSize + 5))
|
||||
# pixel = pix[x * tileSize + 5, y * tileSize + 5]
|
||||
# # binary = bin(pixel)[2:]
|
||||
# # binaryStr = "%08d" % int(binary)
|
||||
# # line += binaryStr
|
||||
# # line += chr(ord('A') + pixel)
|
||||
# # data[x][y] = pixel
|
||||
# # line += chr(pixel)
|
||||
# # print(to24Bit(int(binaryStr[::-1], 2)))
|
||||
# # print(binaryStr, binary, chr(pixel))
|
||||
# # str = str + binaryStr
|
||||
# # str += binary
|
||||
# line += "%02d" % pixel
|
||||
# print(line)
|
||||
|
||||
# data[1][1] = data[0][1] + data[1][0]
|
||||
# for x in range(1,tilesW//2 + 1):
|
||||
# data[x][1] = data[0][x] | data[1][0]
|
||||
# print(chr(ord('A') + data[x][1]))
|
||||
|
||||
|
||||
# for y in range(1,tilesH):
|
||||
# pixel = pix[tilesW * tileSize - 5, y * tileSize + 5]
|
||||
# binary = bin(pixel)[2:]
|
||||
# binaryStr = "%08d" % int(binary)
|
||||
# str = str + binaryStr
|
||||
#
|
||||
# print(str)
|
||||
#
|
||||
# data = [
|
||||
# [255,192,255],
|
||||
# [255,0,255],
|
||||
# [0,255,255]
|
||||
# ]
|
||||
#
|
||||
# print(' '.join(["%08d" % int(bin(to8Bit(p))[2:]) for p in data]))
|
||||
|
||||
|
||||
# print(pix[5, 15], pix[5, 25], pix[5, 35], pix[5, 45], pix[5, 55])
|
||||
BIN
Day 6/decoded.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Day 6/house_decoded.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Day 6/lake_decoded.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Day 6/sheep_decoded.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Day 6/sky_decoded.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Day 6/snake_decoded.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Day 6/test.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Day 6/trees_decoded.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |