Started work on image conversion functions