INNER CODE UNIT · C

len

1oom-fork/1oom · src/fmt_pic.c:100

    int len = 0, w = pic->w, h = pic->h;
    uint8_t *p;
    pic->coded = p = lib_malloc(128 + w * h * 2 + (pic->pal ? (3 * 256 + 1) : 0));
    SET_BE_32(p, 0x0a050108);
    SET_LE_16(&p[8], w - 1);
    SET_LE_16(&p[10], h - 1);
    SET_LE_16(&p[12], 320);
    SET_LE_16(&p[14], 200);
    p[65] = 1;
    SET_LE_16(&p[66], w);
    SET_LE_16(&p[68], 1);
    SET_LE_16(&p[70], 320);
    SET_LE_16(&p[72], 200);
    len += 128;
    p += 128;
    for (int y = 0; y < h; ++y) {
        const uint8_t *q = &(pic->pix[y * pic->pitch]);
        int x;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…