Maybe add the image format in debug message should be more useful when we check the result.