[Webkit-unassigned] [Bug 258467] Camera RAW files picked via file input are returned as PNG on change

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 23 12:41:12 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=258467

Aditya Keerthi <akeerthi at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|DOM                         |Forms
                 CC|                            |akeerthi at apple.com,
                   |                            |cdumez at apple.com,
                   |                            |wenson_hsieh at apple.com

--- Comment #2 from Aditya Keerthi <akeerthi at apple.com> ---
WebKit has logic to automatically transcode images of an unaccepted format, if an accepted format is specified.

In the case of RAW images (.raf), `NSURLFileTypeMappings` does not return a MIME type for the extension, and WebKit incorrect excludes the format from the accepted list. However, the file is recognized by ImageIO as an image type, so WebKit converts it to a PNG.

I also tried using the UniformTypeIdentifiers framework instead of `NSURLFileTypeMappings`, however the extension is still not associated with a valid MIME type.

This is definitely a bug that should be fixed. I think our options are:

1. Reach out to the other frameworks to understand why the type is not recognized. However, even if they add support it wouldn't fix the issue on older OSes.
2. Maintain an additional list of types in WebKit. We sort of already do this for some other formats.
3. Add an exception for transcoding if there is an extension match (don't just rely on MIME types).

(2) is probably the safest approach. (3) might also be nice/correct, but could have some compat fallout. For (1), we should at least learn why the types are missing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230623/37001e0d/attachment-0001.htm>


More information about the webkit-unassigned mailing list