Converted image.h/.cpp to C and implemented the input stream system