Add format spec
This commit is contained in:
parent
02f02a642b
commit
504db3e561
32
README.md
32
README.md
|
@ -1,3 +1,33 @@
|
|||
# irc-bitmap
|
||||
|
||||
A format for sending IRC bitmaps inline.
|
||||
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](http://www.huderlem.com/demos/gameboy2bpp.html).
|
||||
|
||||
Example line: `<igb-1.1-FF007EFF858189839385A58BC9977EFF>`
|
||||
Results in:
|
||||
![Pokemon Red window](https://ttm.sh/qX.png)
|
||||
|
||||
### `raw` - Raw 2-shade monochrome
|
||||
|
||||
2 shade monochrome
|
||||
|
||||
Example line: `<iraw-1.1-FF818181818181FF>`
|
||||
Results in:
|
||||
![box](https://ttm.sh/qy.png)
|
Loading…
Reference in New Issue