A format for sending bitmap images inline over IRC
Go to file
Robert Miles 504db3e561 Add format spec 2019-01-11 16:36:59 -05:00
.gitignore Initial commit 2019-01-11 16:14:23 -05:00
LICENSE Update 'LICENSE' 2019-01-11 16:15:28 -05:00
README.md Add format spec 2019-01-11 16:36:59 -05:00

README.md

irc-bitmap

A format for sending IRC bitmaps inline.

Format

The format string shall be (in Python syntax) r'<i(.+)-(\d+).(\d+)-([0-9A-Fa-f]+)>'.

The first capture group shall be a format. The currently recognized formats are gb and raw, though any format can be used. A program SHOULD gracefully report and exit on an unknown or unsupported format.

The second and third capture groups are the width and height in 8x8 tiles. While there is no theoretical limit to the size of the image you can send, you are bound by any message length limits your server sets, as the entire part MUST fit in one message.

The fourth capture group is a hexadecimal representation of the image data.

Upon recieving a message containing the part, a compliant client MUST take steps to attempt a conversion to PNG or similar. A thread with timeout CAN and SHOULD be used.

Recognized formats

gb - GameBoy 2BPP 4-shade monochrome

For an explanation of the format, see here.

Example line: <igb-1.1-FF007EFF858189839385A58BC9977EFF>
Results in:
Pokemon Red window

raw - Raw 2-shade monochrome

2 shade monochrome

Example line: <iraw-1.1-FF818181818181FF>
Results in:
box