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

version» Context lines:

pike.git/src/modules/Image/encodings/wbf.c:165:   {    unsigned int x, y;    struct image *i;    struct object *io;    unsigned int rowsize = (wh->width+7) / 8;    rgb_group white;    rgb_group *id;    push_int( wh->width );    push_int( wh->height );    io = clone_object( image_program, 2 ); -  i = (struct image*)get_storage(io,image_program); +  i = get_storage(io,image_program);    id = i->img;       white.r = 255;    white.g = 255;    white.b = 255;       for( y = 0; y<wh->height; y++ )    {    unsigned char q = 0; /* avoid warning */    unsigned char *data = buff->str + y * rowsize;
pike.git/src/modules/Image/encodings/wbf.c:391:    int num_strings = 0;       if( !args )    Pike_error("No image given to encode.\n");    if( args > 2 )    Pike_error("Too many arguments to encode.\n");    if( TYPEOF(sp[-args]) != T_OBJECT )    Pike_error("No image given to encode.\n");       o = sp[-args].u.object; -  i = (struct image*)get_storage(o,image_program); +  i = get_storage(o,image_program);    if(!i)    Pike_error("Wrong type object argument\n");    if( args == 2 )    {    if( TYPEOF(sp[-args+1]) != T_MAPPING )    Pike_error("Wrong type for argument 2.\n");    options = sp[-args+1].u.mapping;    }    sp-=args;