Bug 257110

Summary: Implement a reliable way to get the image type from a mime type
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: NEW ---    
Severity: Normal CC: sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Said Abou-Hallawa 2023-05-21 22:52:04 PDT
UTTypeCreatePreferredIdentifierForTag() is used to get the image type from the mime type only on macOS. On iOS, utiFromImageBufferMIMEType() handles only three image formats manually: png, jpeg and gif. On macOS and with user created with "sysadminctl", UTTypeCreatePreferredIdentifierForTag() fails to return valid image type for the mime type "image/png".
Comment 1 Said Abou-Hallawa 2023-05-21 22:52:42 PDT
rdar://107625991
Comment 2 Said Abou-Hallawa 2023-05-21 23:22:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14163