This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from PIL import Image | |
import sys, argparse, random | |
EOF_MARKER = '$eof!' | |
confs = {'RGB':[0,3], 'RGBA':[1,4]} | |
def calculate_min_size(number_of_bits): | |
"""Calculates the minimum image size needed to contain number_of_bits""" | |
min_pxls = number_of_bits//3 # 1 pixel = 3 bits stored |
NewerOlder