diff --git a/README.md b/README.md index e886152..d46b494 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,17 @@ A format for sending IRC bitmaps inline. ## Format -The format string shall be (in Python syntax) `r''`. +The format string shall be (in Python syntax) `r''`. -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: `` Results in: ![Pokemon Red window](https://ttm.sh/qX.png) @@ -28,6 +34,6 @@ Results in: 2 shade monochrome -Example line: `` +Example line: `` Results in: ![box](https://ttm.sh/qy.png) \ No newline at end of file