28 #define ALIAS_HEADER_SIZE 10
50 if (width > 65535 || height > 65535 ||
76 bytestream_put_be16(&buf, width);
77 bytestream_put_be16(&buf, height);
78 bytestream_put_be32(&buf, 0);
79 bytestream_put_be16(&buf, bits_pixel);
81 for (j = 0; j <
height; j++) {
83 for (i = 0; i <
width; ) {
89 while (count < 255 && count + i < width && pixel == *in_buf) {
93 bytestream_put_byte(&buf, count);
94 bytestream_put_byte(&buf, pixel);
97 while (count < 255 && count + i < width &&
102 bytestream_put_byte(&buf, count);
103 bytestream_put_be24(&buf, pixel);