Skip to content

Instantly share code, notes, and snippets.

View arjenvrielink's full-sized avatar

Arjen Vrielink arjenvrielink

View GitHub Profile
@arjenvrielink
arjenvrielink / rgb2indexed.py
Created January 9, 2017 09:31
PNG: RGB to indexed
#!/usr/bin/env python3
from PIL import Image
NUM_COLORS = 128
KMEANS = 3
def quantizetopalette(silf, palette, dither=False):
"""Convert an RGB or L mode image to use a given P image's palette."""
@arjenvrielink
arjenvrielink / gist:a3bc1354f093a16862487496fa40d70e
Created January 9, 2017 09:29
Convert csv input to different format
#!/usr/bin/python
"""
Script to convert Floodtag CSV to column format.
"""
import csv
filename = "filename.csv"
outfile = "filename.csv"

Keybase proof

I hereby claim:

  • I am arjenvrielink on github.
  • I am arjenvrielink (https://keybase.io/arjenvrielink) on keybase.
  • I have a public key whose fingerprint is 6D60 7B95 21BA EFE7 0373 D966 D57E E16C E95F ABC3

To claim this, I am signing this object: