fn read_dimensions_by_mime( data: &[u8], mime_type: &str, ) -> Result<(u32, u32), &'static str>
按 MIME 只读 header 拿 (width, height)。失败返回损坏错误。