Move image related things to image.c
Add image.c to build inputs