Adds a mechanism to determine the image type by using the magic number of the format into the image loader (work in progress)