Update 'README.md'

thanks khuxkm!
This commit is contained in:
sebboh 2019-01-11 16:57:45 -05:00
parent 504db3e561
commit d35c188583
1 changed files with 12 additions and 6 deletions

View File

@ -4,15 +4,17 @@ 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 format string shall be (in Python syntax) `r'<i([^-]+)-([^-]*)-([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 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 identifier of a format may not include a hyphen (dash).
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 second capture group (may be empty) is defined by the format.
The fourth capture group is a hexadecimal representation of the image data.
The third capture group contains the image data and is defined by the format.
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.
Upon receiving a message containing the part, a compliant client MAY take steps to attempt a conversion to PNG or similar, or display the image inline. A thread with timeout CAN and SHOULD be used.
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.
## Recognized formats
@ -20,6 +22,10 @@ Upon recieving a message containing the part, a compliant client MUST take steps
For an explanation of the format, see [here](http://www.huderlem.com/demos/gameboy2bpp.html).
The second capture group specifies the width and height in 8x8 tiles.
The third capture group
Example line: `<igb-1.1-FF007EFF858189839385A58BC9977EFF>`
Results in:
![Pokemon Red window](https://ttm.sh/qX.png)
@ -28,6 +34,6 @@ Results in:
2 shade monochrome
Example line: `<iraw-1.1-FF818181818181FF>`
Example line: `<iraw-8.8-FF818181818181FF>`
Results in:
![box](https://ttm.sh/qy.png)