Issue 543 in webp: [cwebp] libpng error: iTXt: chunk data is too large

584 views
Skip to first unread message

nik… via monorail

unread,
Nov 5, 2021, 10:13:27 AM11/5/21
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 543 by nik...@seyfarth.de: [cwebp] libpng error: iTXt: chunk data is too large
https://bugs.chromium.org/p/webp/issues/detail?id=543

What steps will reproduce the problem?

1. Convert the image bug.png to .webp, like:
cwebp -q 91 bug.png -o image.webp

Image: https://seyfahni.de/bug.png (36M)


What is the expected output? What do you see instead?

I would expext that the image is converted to webp, but I get following error instead:

libpng error: iTXt: chunk data is too large
Error! Could not process file bug.png
Error! Cannot read input picture file 'bug.png'


What version of the product are you using? On what operating system?

cwebp version 1.2.1
libpng version 16.37.0
Kernel: Linux 5.14.15-arch1-1 x86_64


Please provide any additional information below.

This bug seems similar to https://bugs.chromium.org/p/webp/issues/detail?id=497 but that one was apparently fixed and already released with version 1.2.0

--
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

nik… via monorail

unread,
Nov 5, 2021, 11:48:20 AM11/5/21
to webp-d...@webmproject.org

Comment #2 on issue 543 by nik...@seyfarth.de: [cwebp] libpng error: iTXt: chunk data is too large
https://bugs.chromium.org/p/webp/issues/detail?id=543#c2

It is also probably related to metadata again, as running following code before attempting the conversion solves the issue.

`mogrify -strip bug.png`

(utility from ImageMagick which removes all metadata)
ImageMagick version 7.1.0-13

jz… via monorail

unread,
Nov 5, 2021, 1:51:37 PM11/5/21
to webp-d...@webmproject.org
Updates:
Status: Accepted

Comment #3 on issue 543 by jz...@google.com: [cwebp] libpng error: iTXt: chunk data is too large
https://bugs.chromium.org/p/webp/issues/detail?id=543#c3

Thanks for the report. It does look to be the same as issue #497. In this case the data size is 37621997.

We can probably bring this up a little, but we'll want to avoid making things too large as corrupted files can often cause resource exhaustion.

nik… via monorail

unread,
Nov 5, 2021, 2:29:45 PM11/5/21
to webp-d...@webmproject.org

Comment #4 on issue 543 by nik...@seyfarth.de: [cwebp] libpng error: iTXt: chunk data is too large
https://bugs.chromium.org/p/webp/issues/detail?id=543#c4

How about adding a command line option that allows the user to increase the maximum if required?

jz… via monorail

unread,
Nov 5, 2021, 6:43:11 PM11/5/21
to webp-d...@webmproject.org

Comment #5 on issue 543 by jz...@google.com: [cwebp] libpng error: iTXt: chunk data is too large
https://bugs.chromium.org/p/webp/issues/detail?id=543#c5


> How about adding a command line option that allows the user to increase the maximum if required?

That's an option, though it's a little specific.

Chrome (and previously it looks like Firefox) are setting a lower default [1]. This image still renders though so I'd need to check the processing path.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/libpng/pnglibconf.h;l=221;drc=8c0ac8d882561cca77d5184248708b0ce9c851d4
Reply all
Reply to author
Forward
0 new messages