Bug 244103 - [Cocoa] Some AVIF images can't be rendered because their containers formats are HEIF
Summary: [Cocoa] Some AVIF images can't be rendered because their containers formats a...
Status: RESOLVED FIXED
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
: 244324 245097 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-18 14:26 PDT by Myles C. Maxfield
Modified: 2022-10-06 13:37 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2022-08-18 14:26:27 PDT
From https://bugs.webkit.org/show_bug.cgi?id=241904#c4

> I find some avif image in base64 format still can't be render in Safari 16.Here is the image src link https://github.com/kamalendugarai/webp-avif-browsers-support-detection/blob/master/src/index.js#L11
> Browser version 18614.1.19.1.5
> This happened in both Mac OS 13 and iOS 16.
Comment 1 Radar WebKit Bug Importer 2022-08-18 14:26:59 PDT
<rdar://problem/98850829>
Comment 2 Myles C. Maxfield 2022-08-19 14:30:08 PDT
Looks like this is a bug in a system framework. Tracking in <rdar://problem/98850829>
Comment 3 Said Abou-Hallawa 2022-08-25 11:21:12 PDT
*** Bug 244324 has been marked as a duplicate of this bug. ***
Comment 4 Said Abou-Hallawa 2022-09-16 15:28:30 PDT
I think we can fix it (for now) by looking at the ftyp box of the HEIF/AVIF files and check the major_brand and the compatible_brands in this box.

HEIF/AVIF files start with an ftyp box

aligned(8) class GeneralTypeBox(code) extends Box(code) {
    unsigned int(32)    major_brand;
    unsigned int(32)    minor_version;
    unsigned int(32)    compatible_brands[];    // to end of the box
}
Comment 5 Said Abou-Hallawa 2022-09-16 15:46:11 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4434
Comment 6 EWS 2022-09-17 13:02:07 PDT
Committed 254591@main (08227904ddb6): <https://commits.webkit.org/254591@main>

Reviewed commits have been landed. Closing PR #4434 and removing active labels.
Comment 7 Said Abou-Hallawa 2022-10-06 13:37:47 PDT
*** Bug 245097 has been marked as a duplicate of this bug. ***