QuadTree implementation in C for .bmp compression