c image processing from ground up