Support BMP and JPEG