WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
263756
[ macOS ] Enable image sub sampling for macOS
https://bugs.webkit.org/show_bug.cgi?id=263756
Summary
[ macOS ] Enable image sub sampling for macOS
Said Abou-Hallawa
Reported
2023-10-26 18:15:16 PDT
Open these links in WebKit on macOS: 1.
https://upload.wikimedia.org/wikipedia/commons/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg
2.
https://cdn.esawebb.org/archives/images/large/weic2205a.jpg
Result: Display is very slow and part of the image is not shown or shown black. This happens because these images have super gigantic sizes. The first image has size = { 30,000 x 23,756 }. Because on macOS, we do not allow image sub-sampling, the whole image has to be decoded. This will require memory with size = 30,000 x 23,756 x 4 ~= 2.85 GB. But usually we need to scale it down to the screen size which can be something like { 3,000 x 2,400 }. This means in this sase the image will be scaled down to 1/100 of its natural size. This means every 100 pixels are mapped to 1 single pixel. So we do not need to decode the image with the natural size and the natural quality in this case. This can be fixed by using image sub sampling which will reduce the memory allocation and the decoding time. Image sub sampling is already enabled on iOS.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-10-26 18:15:34 PDT
<
rdar://problem/117561288
>
Said Abou-Hallawa
Comment 2
2023-10-26 19:12:32 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/19618
EWS
Comment 3
2023-10-27 17:29:13 PDT
Committed
269875@main
(a638930cea32): <
https://commits.webkit.org/269875@main
> Reviewed commits have been landed. Closing PR #19618 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug