

unsigned long *tilefilter(unsigned char *data,int width,int height)
{
    unsigned char *out = (void*)malloc(width*height),*rout,x,y,l,m;
    rout=out;
        
    for(y=0;y<height/8;y++)
    { 
      for(x=0;x<width/8;x++)
      { 
        for(l=0;l<8;l++)
        { 
          for(m=0;m<8;m++)
          {
           *out++=data[m+(l*width)+(x*8)+(y*8*width)];
          }
        }
      }
    }
    return((unsigned long*)rout);
}

