Closed saitoha closed 10 years ago
I agree. COLOR_RGB888 must be 3 for compatibility. And we need to rewrite arguments of sixel_dither_initialize() and sixel_encode() like this
diff --git a/converters/img2sixel.c b/converters/img2sixel.c index 0232b70..6b7b966 100644 --- a/converters/img2sixel.c +++ b/converters/img2sixel.c @@ -142,7 +142,7 @@ prepare_specified_palette(char const *mapfile, int reqcolors) if (dither == NULL) { return NULL; }
ret = sixel_dither_initialize(dither, mappixels, map_sx, map_sy, COLOR_RGB888, LARGE_NORM, REP_CENTER_BOX, QUALITY_LOW); if (ret != 0) { sixel_dither_unref(dither); @@ -226,7 +226,7 @@ prepare_palette(unsigned char frame, int sx, int sy, settings_t psettings) }
dither = sixel_dither_create(psettings->reqcolors);
ret = sixel_dither_initialize(dither, frame, sx, sy, COLOR_RGB888,
psettings->method_for_largest,
psettings->method_for_rep,
psettings->quality_mode);
@@ -504,7 +504,7 @@ convert_to_sixel(char const filename, settings_t psettings) printf("\033P%d;0;1!z", n); }
nret = sixel_encode(frames[n], sx, sy, 3, dither, context);
nret = sixel_encode(frames[n], sx, sy, COLOR_RGB888, dither, context);
if (nret != 0) {
goto end;
}
@@ -614,7 +614,7 @@ convert_to_sixel(char const filename, settings_t psettings)
}
nret = sixel_encode(frames[n], sx, sy, 3, dither, context);
ok, your additional patch will be merged into feature-support-various-pixformat
COLOR_RGB888 had better be 3.