add image format mapping function