Skip to content

Instantly share code, notes, and snippets.

View Snyder's full-sized avatar

José Manuel Snyder Snyder

View GitHub Profile
@Snyder
Snyder / fileToImage.py
Created November 6, 2013 18:14
Convert a file into it's image representation, it only takes the raw byte stream and make it pixels and then makes an image.
#!/usr/bin/env python
import Image
from math import sqrt
import sys
def creaImg(entrada, salida):
with open(entrada, 'r') as f:
datos = f.read()
bytes_datos = bytearray(datos)
pixeles = []