set the file type parameter after reading the image