Bug 259960 - [Cocoa] Super gigantic images should not be decoded with their natural sizes
Summary: [Cocoa] Super gigantic images should not be decoded with their natural sizes
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-08-08 18:07 PDT by Said Abou-Hallawa
Modified: 2023-10-24 07:53 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-08-08 18:07:04 PDT
Test case: https://upload.wikimedia.org/wikipedia/commons/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg

Image sub-sampling should be enabled for macOS so the number of the decoded pixels is scaled down by the ratio between destinationSize and sourceSize.

For non-scaled display, sub-images should be used to display the image on different tiles. The size of the sub-image will be the mapping of the destination rectangle clipped by the GraphicsContext.bounds() in the image rectangle.
Comment 1 Said Abou-Hallawa 2023-08-08 18:07:45 PDT
rdar://113305719
Comment 2 Said Abou-Hallawa 2023-08-08 18:17:58 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16505