Bug 274249

Summary: Safari 17.4 does not support PNG images with 1-bit grayscale and simple transparency (tRNS chunk)
Product: WebKit Reporter: Stéphane Magnenat <stephane>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: ahmad.saleem792, ap, karlcow, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
A PNG valid according to pngcheck but that cannot be loaded by Safari none

Stéphane Magnenat
Reported 2024-05-16 02:59:02 PDT
Created attachment 471420 [details] A PNG valid according to pngcheck but that cannot be loaded by Safari Safari is not able to load the attached PNG (EncodingError: Loading error), which is valid according to `pngcheck`: ``` pngcheck -v png_not_work_in_safari.png File: png_not_work_in_safari.png (287 bytes) chunk IHDR at offset 0x0000c, length 13 1599 x 994 image, 1-bit grayscale, non-interlaced chunk tRNS at offset 0x00025, length 2 gray = 0x0000 chunk IDAT at offset 0x00033, length 216 zlib: deflated, 32K window, superfast compression chunk IEND at offset 0x00117, length 0 No errors detected in png_not_work_in_safari.png (4 chunks, 99.9% compression). ``` The PNG was generated by zopflipng (https://github.com/google/zopfli/) version 1.0.3 as part of a batch optimization of a game asset database.
Attachments
A PNG valid according to pngcheck but that cannot be loaded by Safari (287 bytes, image/png)
2024-05-16 02:59 PDT, Stéphane Magnenat
no flags
Stéphane Magnenat
Comment 1 2024-05-16 03:24:06 PDT
Note that this image works fine with Firefox or Chrome.
Radar WebKit Bug Importer
Comment 2 2024-05-16 07:29:55 PDT
Alexey Proskuryakov
Comment 3 2024-05-16 14:56:33 PDT
This image also fails to open in Preview, so this is an issue in underlying system frameworks that other browsers don't use, not in WebKit. Thank you for the report, Apple will continue working on this internally.
Note You need to log in before you can comment on or make changes to this bug.