% Software Design %
% Hayaki Saito %
% September 2014 %
-% Based on kmiya@culti's sixel decoder %
+% Based on kmiya's sixel (2014-03-28) %
% %
% %
% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
* 1: 8bit terminal */
unsigned char has_8bit_control;
- unsigned char conv_palette[256];
int save_pixel;
int save_count;
int active_palette;
/* designate palette index */
if (context->active_palette != np->color) {
nwrite = sprintf((char *)context->buffer + context->pos,
- "#%d", context->conv_palette[np->color]);
+ "#%d", np->color);
sixel_advance(context, nwrite);
context->active_palette = np->color;
}
return (MagickFalse);
}
(void) ResetMagickMemory(map, 0, len);
- for (n = 0; n < (ssize_t) ncolors; n++) {
- context->conv_palette[n] = n;
- }
if (context->has_8bit_control) {
nwrite = sprintf((char *)context->buffer, "\x90" "0;0;0" "q");
for (n = 0; n < ncolors; n++) {
/* DECGCI Graphics Color Introducer # Pc ; Pu; Px; Py; Pz */
nwrite = sprintf((char *)context->buffer + context->pos, "#%d;2;%d;%d;%d",
- context->conv_palette[n],
+ n,
(palette[n * 3 + 0] * 100 + 127) / 255,
(palette[n * 3 + 1] * 100 + 127) / 255,
(palette[n * 3 + 2] * 100 + 127) / 255);