Skip to content

Instantly share code, notes, and snippets.

View mbrethes's full-sized avatar

Mathieu Brèthes mbrethes

  • Germany
View GitHub Profile
@xiongyihui
xiongyihui / gif2c.py
Created February 2, 2018 07:47
convert image (ICO, GIF, PNG, JPG and etc) to C array
import sys
from PIL import Image
if len(sys.argv) != 3:
print('Usage: python {} image.gif array.c'.format(sys.argv[0]))
sys.exit(1)
im = Image.open(sys.argv[1])