Issue 563 in webp: Photocopier TIFF fails to convert to webp

48 views
Skip to first unread message

brian… via monorail

unread,
Mar 18, 2022, 1:32:21 AMMar 18
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 563 by brian...@gmail.com: Photocopier TIFF fails to convert to webp
https://bugs.chromium.org/p/webp/issues/detail?id=563

What steps will reproduce the problem?

$ cwebp -preset default Sample.tif -o Sample.webp

What is the expected output?

Saving file 'Sample.webp'

What do you see instead?

Error! Could not process file Sample.tif
Error! Cannot read input picture file 'Sample.tif'

What version of the product are you using?

$ cygcheck -c `apt-cyg l webp | cut -d' ' -f1`
Cygwin Package Information
Package Version Status
libwebp 1.2.2-1 OK
libwebp-devel 1.2.2-1 OK
libwebp7 1.2.2-1 OK
libwebpdecoder3 1.2.2-1 OK
libwebpdemux2 1.2.2-1 OK
libwebpmux3 1.2.2-1 OK

On what operating system?

$ uname -srvmo
CYGWIN_NT-10.0 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
$ win-ver
Windows 10 Home Client Core Multiprocessor Free 6.3 21H2 2009 vb_release 10 0 19044 1586

Please provide any additional information below.

Input TIFF:

$ file Sample.tif
Sample.tif: TIFF image data, little-endian, direntries=16, height=3264, bps=1, compression=bi-level group 4, PhotometricIntepretation=WhiteIsZero, orientation=upper-left, width=2504

File converts to webp with Irfan View and Image Magick:

$ magick Sample.tif SampleT.webp
$ ls -glo Sample.tif SampleT.webp
-rw-r--r-- 1 80978 Sep 16 2013 Sample.tif
-rw-r--r-- 1 454762 Mar 17 23:27 SampleT.webp

Attachments:
Sample.tif 79.1 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

brian… via monorail

unread,
Mar 18, 2022, 1:44:24 AMMar 18
to webp-d...@webmproject.org

Comment #1 on issue 563 by brian...@gmail.com: Photocopier TIFF fails to convert to webp
https://bugs.chromium.org/p/webp/issues/detail?id=563#c1

$ file Sample.tif SampleT.webp

Sample.tif: TIFF image data, little-endian, direntries=16, height=3264, bps=1, compression=bi-level group 4, PhotometricIntepretation=WhiteIsZero, orientation=upper-left, width=2504
SampleT.webp: RIFF (little-endian) data, Web/P image, VP8 encoding, 2504x3264, Scaling: [none]x[none], YUV color, decoders should clamp

jz… via monorail

unread,
Mar 18, 2022, 11:01:23 PMMar 18
to webp-d...@webmproject.org
Updates:
Status: Accepted

Comment #2 on issue 563 by jz...@google.com: Photocopier TIFF fails to convert to webp
https://bugs.chromium.org/p/webp/issues/detail?id=563#c2

Thanks for the report. cwebp relies on libtiff for decoding when not built with Windows Image Component support. I can reproduce the failure with libtiff-4.3.0-4 under Debian testing; tifftopnm works. Looking at the file output it looks like Sample.tif is monochrome which we aren't handling. Let me a take a look at the decode.

Git Watcher via monorail

unread,
Apr 2, 2022, 1:05:04 AMApr 2
to webp-d...@webmproject.org

Comment #5 on issue 563 by Git Watcher: Photocopier TIFF fails to convert to webp
https://bugs.chromium.org/p/webp/issues/detail?id=563#c5

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

commit 0957fd69eeb86ca9a4ca6801b7a87f37bd644d09
Author: James Zern <jz...@google.com>
Date: Fri Apr 01 04:38:00 2022

tiffdec: add grayscale support

the file is always decoded to RGBA, so just the samples_per_px needed an
update

Bug: webp:563
Change-Id: I95d95c3b9e45dc8ecb2223f89f4ba791f0b21e8b

[modify] https://crrev.com/0957fd69eeb86ca9a4ca6801b7a87f37bd644d09/imageio/tiffdec.c

jz… via monorail

unread,
Apr 2, 2022, 1:06:07 AMApr 2
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #6 on issue 563 by jz...@google.com: Photocopier TIFF fails to convert to webp
https://bugs.chromium.org/p/webp/issues/detail?id=563#c6

Thanks again for the report. This should be fixed and will be available in the next release.
Reply all
Reply to author
Forward
0 new messages