pub fn detect_format(data: &[u8]) -> ImageFormat
检查图片数据是否具有有效的文件头签名。
对应 Java: ImageUtils 中的格式判断逻辑
ImageUtils