pike.git / src / modules / Image / encodings / xcf.c

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.1 1999/04/11 05:38:22 per Exp $"); + RCSID("$Id: xcf.c,v 1.2 1999/04/11 05:48:51 per Exp $");      #include "config.h"      #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "module_support.h"   #include "interpret.h"   #include "object.h"   #include "svalue.h"
pike.git/src/modules/Image/encodings/xcf.c:1029:   **! }),   **! ]),   **! }),   **! ])   **!</pre>   */      #define MIN(X,Y) ((X)<(Y)?(X):(Y))   void image_xcf_f__decode_tiles( INT32 args )   { +  extern void check_signals();    struct object *io,*ao, *cmapo;    struct array *tiles;    struct image *i, *a;    struct neo_colortable *cmap = NULL;    rgb_group *colortable=NULL;    int rle, bpp, span;    unsigned int l, x=0, y=0, cx, cy;    get_all_args( "_decode_tiles", args, "%o%o%a%i%i%O",    &io, &ao, &tiles, &rle, &bpp, &cmapo);    if( !(i = (struct image *)get_storage( io, image_program )))
pike.git/src/modules/Image/encodings/xcf.c:1069:    x=y=0;    for(l=0; l<(unsigned)tiles->size; l++)    {    struct pike_string *tile = tiles->item[l].u.string;    unsigned int eheight, ewidth;    unsigned char *s;    ewidth = MIN(TILE_WIDTH, i->xsize-x);    eheight = MIN(TILE_HEIGHT, i->ysize-y);    tile->refs++;    -  fprintf(stderr, " tile %d/%d [%dx%d] %dbpp \n", -  l+1, tiles->size, ewidth, eheight,bpp); + /* fprintf(stderr, " tile %d/%d [%dx%d] %dbpp \n", */ + /* l+1, tiles->size, ewidth, eheight,bpp); */       if(rle)    {    push_string( tile );    push_int( bpp );    push_int( ewidth );    push_int( eheight );    image_xcf_f__rle_decode( 4 );    tile = sp[-1].u.string;    if(sp[-1].type != T_STRING)
pike.git/src/modules/Image/encodings/xcf.c:1105:    for(cx=0; cx<ewidth; cx++)    {    rgb_group pix;    rgb_group apix = {255,255,255};    int ind = (cx+cy*ewidth);       if(rle)    span = ewidth*eheight;    else    span = 1; -  if(cx+x > i->xsize) continue; -  if(cy+y > i->ysize) continue; +  if(cx+x > (unsigned)i->xsize) continue; +  if(cy+y > (unsigned)i->ysize) continue;       switch( bpp )    {    case 1: /* indexed or grey */    if(colortable)    pix = colortable[s[ind]];    else    pix.r = pix.g = pix.b = s[ind];    break;    case 2: /* indexed or grey with alpha */