Extracted image format related things into a separate module.