Image processing in C - Phillips