Skip to content

Instantly share code, notes, and snippets.

@kura
Created August 14, 2016 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kura/9156e9e111932c73997f1ec890219eb4 to your computer and use it in GitHub Desktop.
Save kura/9156e9e111932c73997f1ec890219eb4 to your computer and use it in GitHub Desktop.
1x1 transparent gif
import struct
def gif():
data = [0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x21,
0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x01, 0x44,
0x00, 0x3b]
return struct.pack('42B', *data)
# HTTP headers
#
# content-type: image/gif
#
# Body
#
# gif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment