Issue 361 in webp: Incorrect WebP decoding in Chrome on Windows

32 views
Skip to first unread message

j… via monorail

unread,
Oct 6, 2017, 8:08:58 AM10/6/17
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 361 by j...@cloudinary.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361

We have encountered a problem with some WebP images containing transparency and an ICC color profile that might be problematic (libpng seems to know about it and calls it a "known incorrect sRGB profile").

The WebP displays fine in most environments we have tested, but in Chrome for Windows, it renders incorrectly: the dark red letters get a blue edge that should not be there.

The problematic WebP file and a screenshot of the incorrect behavior are attached to this issue.

The problem can be avoided by getting rid of the color profile; however it should not happen that the same WebP file renders differently depending on the platform, so we suspect a bug, either in libwebp or in Chrome.

Attachments:
problem_image.webp 3.8 KB
Screen Shot 2017-09-27 at 18.50.41.png 6.2 KB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

j… via monorail

unread,
Oct 6, 2017, 8:29:21 AM10/6/17
to webp-d...@webmproject.org

Comment #1 on issue 361 by j...@cloudinary.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c1

To be more precise about in which versions of Chrome this issue occurs, we have found the following behavior:

Chrome version 59
PC (64-bit) - For both retina and non-retina displays, the WebP image is not the same as the original PNG image.

Chrome version 60
MAC - On all screens (retina and non-retina) the WebP image is the same as the original PNG image.
PC (32-bit) - On all screens (retina and non-retina) the WebP image is the same as the original PNG image.

Chrome version 61
PC (32-bit) - On all screens (retina and non-retina) the WebP image is the same as the original PNG image.
PC (64-bit) - For both retina and non-retina displays, the WebP image is not the same as the original PNG image.
MAC - Bad on retina, but good on non-retina.

vincent.… via monorail

unread,
Oct 6, 2017, 10:45:50 AM10/6/17
to webp-d...@webmproject.org
Updates:
Status: Accepted

Comment #2 on issue 361 by vincent....@gmail.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c2

Thx for the report, do you also have the original PNG just in case ?
By PC, do you mean Windows only or Linux too ?
For me, the blue lines appear on Linux 64 on Chrome 61 on a normal desktop screen.

jz… via monorail

unread,
Oct 6, 2017, 5:28:06 PM10/6/17
to webp-d...@webmproject.org

Comment #3 on issue 361 by jz...@chromium.org: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c3

libwebp doesn't interpret the color profile, so anything to do with the application and rendering of that would be a chrome issue [1].

[1] https://bugs.chromium.org/p/chromium

j… via monorail

unread,
Oct 11, 2017, 6:25:07 AM10/11/17
to webp-d...@webmproject.org

Comment #4 on issue 361 by j...@cloudinary.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c4

Here is the original PNG that causes the problematic behavior when converted to WebP (if using cwebp -metadata all).

Attachments:
problem_image.png 3.7 KB

j… via monorail

unread,
Oct 11, 2017, 6:32:31 AM10/11/17
to webp-d...@webmproject.org

Comment #5 on issue 361 by j...@cloudinary.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c5

I have opened an issue on the chrome bug tracker:
https://bugs.chromium.org/p/chromium/issues/detail?id=773630

ccame… via monorail

unread,
Oct 16, 2017, 4:26:11 PM10/16/17
to webp-d...@webmproject.org

Comment #6 on issue 361 by ccam...@chromium.org: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c6

Very likely related to
https://bugs.chromium.org/p/chromium/issues/detail?id=747640#c19

There are lots of WebP images out there that do not set ALPHA_FLAG in WEBP_FF_FORMAT_FLAGS, but yet expect the image's alpha channel to be read.

Depending on the color conversion path, Chrome will sometimes read the alpha channel even if ALPHA_FLAG isn't set -- we shouldn't count on that.

pascal.m… via monorail

unread,
Oct 17, 2017, 1:35:12 AM10/17/17
to webp-d...@webmproject.org

Comment #7 on issue 361 by pascal.m...@gmail.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c7

thanks for the update. I think your call is right: don't change Chrome's behaviour but encourage compliant files instead. Thanks!

j… via monorail

unread,
Oct 18, 2017, 4:36:47 AM10/18/17
to webp-d...@webmproject.org

Comment #8 on issue 361 by j...@cloudinary.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c8

How can we produce compliant files?

We produced the problematic image using "cwebp -metadata all -lossless -alpha_cleanup problem_image.png -o problem_image.webp". It doesn't seem to matter much which exact version of cwebp we're using (the problem is still there in version 0.6.0).

jz… via monorail

unread,
Oct 18, 2017, 3:33:05 PM10/18/17
to webp-d...@webmproject.org
Updates:
Owner: jz...@google.com
Status: Started

Comment #9 on issue 361 by jz...@google.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c9

That sounds like it could be a bug in cwebp, let me take a look.

bugdro… via monorail

unread,
Oct 19, 2017, 1:35:39 AM10/19/17
to webp-d...@webmproject.org

Comment #10 on issue 361 by bugd...@chromium.org: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c10

The following revision refers to this bug:
https://chromium.googlesource.com/webm/libwebp/+/68b2eab7df55ab6cc8a84559538edfaf1b3ea24f

commit 68b2eab7df55ab6cc8a84559538edfaf1b3ea24f
Author: James Zern <jz...@google.com&gt;
Date: Wed Oct 18 19:35:56 2017

cwebp: fix alpha reporting w/lossless & metadata

the incorrect bit was being extracted from the lossless bitstream header
causing the alpha flag in VP8X to be misreported. previously the
signature byte was ignored in the calculation of the offset.

since:
8ba1bf61 Stricter check for presence of alpha when writing lossless
images

BUG=webp:361

Change-Id: I7c618b5f01a37f5e4b799dee11a7949efaf88046

[modify] https://crrev.com/68b2eab7df55ab6cc8a84559538edfaf1b3ea24f/examples/cwebp.c

jz… via monorail

unread,
Nov 16, 2017, 1:36:10 AM11/16/17
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #12 on issue 361 by jz...@google.com: Incorrect WebP decoding in Chrome on Windows
https://bugs.chromium.org/p/webp/issues/detail?id=361#c12

This is fixed on the webp side. Chrome decided to avoid working around the issue, so hopefully now we can limit new files being produced with the problem.
Reply all
Reply to author
Forward
0 new messages