diff options
Diffstat (limited to 'lss16toppm.c')
-rw-r--r-- | lss16toppm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lss16toppm.c b/lss16toppm.c index db4d448..6dcff62 100644 --- a/lss16toppm.c +++ b/lss16toppm.c @@ -92,14 +92,14 @@ main(int argc, char *argv[]) if (!head_printed) { head_printed = 1; - len = sprintf(wbuf, "P6\n%u %u\n255\n", decoder.width, decoder.height); + len = sprintf(wbuf, "P6\n%u %u\n255\n", decoder.image.width, decoder.image.height); if (len < 0 || (size_t)len >= sizeof(wbuf)) abort(); pending = (size_t)len; if (print_colour_map) { - for (i = 0; i < sizeof(decoder.colour_map) / sizeof(*decoder.colour_map); i++) { - fprintf(stderr, "#%02x%02x%02x=%zu\n", decoder.colour_map[i].r, - decoder.colour_map[i].g, decoder.colour_map[i].b, i); + for (i = 0; i < sizeof(decoder.image.colour_map) / sizeof(*decoder.image.colour_map); i++) { + fprintf(stderr, "#%02x%02x%02x=%zu\n", decoder.image.colour_map[i].r, + decoder.image.colour_map[i].g, decoder.image.colour_map[i].b, i); } } } @@ -108,9 +108,9 @@ main(int argc, char *argv[]) writeall(wbuf, pending); pending = 0; } - wbuf[pending++] = (char)decoder.colour_map[pixels[i]].r; - wbuf[pending++] = (char)decoder.colour_map[pixels[i]].g; - wbuf[pending++] = (char)decoder.colour_map[pixels[i]].b; + wbuf[pending++] = (char)decoder.image.colour_map[pixels[i]].r; + wbuf[pending++] = (char)decoder.image.colour_map[pixels[i]].g; + wbuf[pending++] = (char)decoder.image.colour_map[pixels[i]].b; } } } |