WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED MOVED
205568
JPEG 2000 images with alpha have begun looking strange
https://bugs.webkit.org/show_bug.cgi?id=205568
Summary
JPEG 2000 images with alpha have begun looking strange
Eric Portis
Reported
2019-12-23 15:12:06 PST
In recent versions of iOS/MacOS/WebKit, the fully (and almost-fully) transparent bits of JPEG2000 images, which looked fine in previous versions, have begun turning green when placed on non-white backgrounds. Here is a test page with three source JP2s:
https://ericportis.com/etc/jp2-transparency-bug/
Here is what it looks like in iOS 12, when *not* exhibiting the problem:
https://slack-files.com/T03FFDY8K-FRP9BRB9R-58950a5715
Here is what it looks like in iOS 13, when exhibiting the problem:
https://slack-files.com/T03FFDY8K-FS2K01D63-8eb9fde71b
Notes: - The problem occurs in Catalina/desktop Safari, as well as in Mobile Safari. - We have only seen the problem in WebViews/Safari; we have not seen it in Preview, Photos, or other system software. - We have only seen it in recent versions of things: Catalina + Safari 13, or iOS 13 + Safari 13. - The error is not 100% consistently reproducible. Some iPhones/Macs running the same Safari version will show different results, sometimes. - It does not affect all JP2s. All of the JP2s in the example above were generated from PNG source files, using Cloudinary (which uses Kakadu under the hood). When running these same source files through Preview and Exporting as JP2, we have yet to see the issue. We will continue to test with other encoders, and different encoder settings... - When ignoring alpha entirely, the images also "turn green" -- that is, the RGB color of these images is green for some reason (presumably something to do with encoder efficency), and the Alpha, which is near 100%, is being ignored or multiplied incorrectly or something by some part of the display chain (again, they always look fine on white). Here's what one of the problematic JP2s looks like with its Alpha channel simply ignored:
https://slack-files.com/T03FFDY8K-FRY0UFWUQ-6681080f44
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2019-12-25 10:46:26 PST
Thank you for the report! I can reproduce on an iPhone. And I confirm that this isn't happening on macOS 10.14.6 with the latest Safari. I think that this points to an issue in image decoding libraries below WebKit. Would you be willing to report this to Apple via <
https://feedbackassistant.apple.com
>? That way, the teams involved would be able to communicate with you. Please post the feedback ID here for reference.
Eric Portis
Comment 2
2019-12-26 09:30:27 PST
Ok, I've reported via Feedback Assistant; feedback ID FB7509216. (One other possibly-interesting note... sometimes the issue appears on zoom, on iOS?
https://slack-files.com/T03FFDY8K-FS3LHH2JJ-0b89bb6ec4
)
Alexey Proskuryakov
Comment 3
2019-12-26 12:35:25 PST
Thank you! Marking as RESOLVED/MOVED, this will continue to be tracked by Apple as an issue below WebKit.
rdar://problem/58207014
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