diff --git a/src/demo/keller.c b/src/demo/keller.c index 09db788b1..cf794f91c 100644 --- a/src/demo/keller.c +++ b/src/demo/keller.c @@ -30,9 +30,9 @@ visualize(struct notcurses* nc, struct ncvisual* ncv){ const char* name = notcurses_str_blitter(bs[i]); int scalex, scaley, truey, truex; ncvisual_geom(nc, ncv, &vopts, &truey, &truex, &scaley, &scalex); + ncplane_putstr_aligned(vopts.n, ncplane_dim_y(vopts.n) / 2 - 3, NCALIGN_CENTER, name); ncplane_printf_aligned(vopts.n, ncplane_dim_y(vopts.n) / 2 - 1, NCALIGN_CENTER, - "%dx%d", truex, truey); - ncplane_putstr_aligned(vopts.n, ncplane_dim_y(vopts.n) / 2, NCALIGN_CENTER, name); + "%03dx%03d", truex, truey); ncplane_printf_aligned(vopts.n, ncplane_dim_y(vopts.n) / 2 + 1, NCALIGN_CENTER, "%d:%d pixels -> cell", scalex, scaley); int ret = demo_render(nc); diff --git a/src/lib/sixel.c b/src/lib/sixel.c index 856e354c4..776ce6c4e 100644 --- a/src/lib/sixel.c +++ b/src/lib/sixel.c @@ -5,10 +5,12 @@ break_sixel_comps(unsigned char comps[static 3], uint32_t rgba, unsigned char ma comps[0] = (ncpixel_r(rgba) & mask) * 100 / 255; comps[1] = (ncpixel_g(rgba) & mask) * 100 / 255; comps[2] = (ncpixel_b(rgba) & mask) * 100 / 255; +//fprintf(stderr, "%u %u %u\n", comps[0], comps[1], comps[2]); } // first pass: extract up to 256 sixelspace colors over arbitrarily many sixels // sixelspace is 0..100 corresponding to 0..255, lame =[ +// FIXME you can have more (or fewer) than 256 registers...detect? typedef struct colortable { int colors; int sixelcount;