pike.git / lib / modules / _Image_XPM.pmod

version» Context lines:

pike.git/lib/modules/_Image_XPM.pmod:61:    int cpp = values[3];    if(sizeof(values)>5)    {    retopts->hot_x = values[4];    retopts->hot_y = values[5];    }    TD("Colors");    if(sizeof(data) < ncolors+2)    error("Too few elements in array to decode color values\n");    array colors; -  if(cpp < 4) -  colors = data[1..ncolors]; -  else +  + // kludge? probable FIXME? + // I can't see why the colors not always must be sorted... + // /Mirar 2003-01-31 +  + // if(cpp < 4) + // colors = data[1..ncolors]; + // else    colors = sort(data[1..ncolors]);    TD("Creating images");    object i = Image.image( width, height );    object a = Image.image( width, height,255,255,255 );    TD("Decoding image");   // for(int y = 0; y<height && y<sizeof(data); y++)    _xpm_write_rows( i,a,cpp,colors,data );   // _xpm_write_row( height, i, a, data[ncolors+y+1], cpp, colors );    TD("Done");