Converts an image file into hex