pike.git / lib / modules / _Image_XPM.pmod

version» Context lines:

pike.git/lib/modules/_Image_XPM.pmod:107:    {    cmap_f = allocate( 8100 );    cmap_t = allocate( 8100 );    for(x=0; x<90; x++)    for(y=0; y<90; y++)    cmap_t[q++] = ok[x]+ok[y];    }    TD("Encode CT");    if(!options->colortable)    { -  options->colortable = Image.colortable( what, 8089 ); +  options->colortable = Image.Colortable( what, 8089 );    options->colortable->rigid( 25, 25, 25 );    options->colortable->floyd_steinberg();    }    if(!options->name)    options->name = "image";    int alpha_used;    TD("Encode map");    array rows=options->colortable->index(what)/what->xsize();       TD("Encode colors");
pike.git/lib/modules/_Image_XPM.pmod:130:    int n;    foreach(((string)options->colortable)/3, mixed c)    {    colors += ({sprintf("%s c #%02x%02x%02x",cmap_t[n++],c[0],c[1],c[2])});    ncolors++;    }       TD("Encode alpha");    if(options->alpha)    { -  object ac = Image.colortable( ({ Image.color.white, Image.color.black }) ); +  object ac = Image.Colortable( ({ Image.Color.white, Image.Color.black }) );    array q = ac->index( options->alpha )/what->xsize();    string alpha_color = " ";    string minus_ett = " ";    alpha_color[0] = ncolors;    minus_ett[0] = -1;    for(y=0; y<sizeof(q); y++)    rows[y]=replace(rows[y]|replace(q[y],"\1",minus_ett),minus_ett,alpha_color );    }    if(alpha_used)    {