Bug 257110 - Implement a reliable way to get the image type from a mime type
Summary: Implement a reliable way to get the image type from a mime type
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-21 22:52 PDT by Said Abou-Hallawa
Modified: 2023-05-21 23:22 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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