Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 547 by roman...@
gmail.com: webpmux cannot perform exif metadata write operation
https://bugs.chromium.org/p/webp/issues/detail?id=547I am using webpmux to write exif metadata to an image. The sequence of actions that I follow:
1) I am generating an exif file with the data I need
```
~$ exiftool -ver
12.00
~$ exiftool -m -EXIF:UserComment='{"foo":bar}' default.exif
```
2) I am using webpmux to write exif metadata but I get the error
```
~$ webpmux -set exif default.exif input.webp -o output.webp
Failed to create mux object from file input.webp.
```
Information about my software:
```
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
~$ webpmux -version
1.2.1
~$ cwebp -version
1.2.1
~$ webpinfo -version
WebP Decoder version: 1.2.1
```
webpinfo confirms that I am processing a webp image
```
~$ webpinfo input.webp
File: input.webp
RIFF HEADER:
File size: 49324
Chunk VP8X at offset 12, length 18
ICCP: 0
Alpha: 1
EXIF: 0
XMP: 0
Animation: 0
Canvas size 2000 x 2000
Chunk ALPH at offset 30, length 12434
Chunk VP8 at offset 12464, length 36860
Width: 2000
Height: 2000
Alpha: 0
Animation: 0
Format: Lossy (1)
No error detected.
```
I noticed that if you convert a picture using cwebp, then the problem disappears
```
~$ cwebp input.webp -o input.webp
Saving file 'input.webp'
File: input.webp
Dimension: 2000 x 2000 (with alpha)
Output: 45444 bytes Y-U-V-All-PSNR 50.02 59.69 61.51 51.59 dB
(0.09 bpp)
block count: intra4: 2112 (13.52%)
intra16: 13513 (86.48%)
skipped: 12600 (80.64%)
bytes used: header: 179 (0.4%)
mode-partition: 14289 (31.4%)
transparency: 13372 (99.0 dB)
Residuals bytes |segment 1|segment 2|segment 3|segment 4| total
macroblocks: | 2%| 6%| 7%| 85%| 15625
quantizer: | 36 | 36 | 31 | 24 |
filter level: | 11 | 23 | 54 | 21 |
Lossless-alpha compressed size: 13371 bytes
* Header size: 228 bytes, image data size: 13143
* Lossless features used: PALETTE
* Precision Bits: histogram=6 transform=5 cache=0
* Palette size: 248
~$ webpinfo input.webp
File: input.webp
RIFF HEADER:
File size: 45444
Chunk VP8X at offset 12, length 18
ICCP: 0
Alpha: 1
EXIF: 0
XMP: 0
Animation: 0
Canvas size 2000 x 2000
Chunk ALPH at offset 30, length 13380
Chunk VP8 at offset 13410, length 32034
Width: 2000
Height: 2000
Alpha: 0
Animation: 0
Format: Lossy (1)
No error detected.
~$ webpmux -set exif default.exif input.webp -o output.webp
Saved file output.webp (45666 bytes)
```
The same issue occurs when running OS X Big Sur 11.6.1 using the current version of webpmux
Ubuntu 18.04 and webpmux downloaded from the repository are causing this issue as well.
```
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
~$ webpmux -version
0.4.1
~$ cwebp -version
0.6.1
~$ webpinfo -version
WebP Decoder version: 0.6.1
~$ webpmux -set exif default.exif input.webp -o output.webp
Failed to create mux object from file input.webp.
~$ webpinfo input.webp
File: input.webp
RIFF HEADER:
File size: 49324
Chunk VP8X at offset 12, length 18
ICCP: 0
Alpha: 1
EXIF: 0
XMP: 0
Animation: 0
Canvas size 2000 x 2000
Chunk ALPH at offset 30, length 12434
Chunk VP8 at offset 12464, length 36860
Width: 2000
Height: 2000
Alpha: 0
Animation: 0
Format: Lossy (1)
No error detected.
~$ cwebp input.webp -o input.webp
Saving file 'input.webp'
File: input.webp
Dimension: 2000 x 2000 (with alpha)
Output: 46002 bytes Y-U-V-All-PSNR 49.97 50.95 56.61 50.75 dB
block count: intra4: 6524
intra16: 9101 (-> 58.25%)
skipped block: 11997 (76.78%)
bytes used: header: 184 (0.4%)
mode-partition: 14726 (32.0%)
transparency: 13392 (99.0 dB)
Residuals bytes |segment 1|segment 2|segment 3|segment 4| total
macroblocks: | 2%| 5%| 6%| 85%| 15625
quantizer: | 36 | 36 | 31 | 24 |
filter level: | 11 | 23 | 40 | 21 |
Lossless-alpha compressed size: 13391 bytes
* Header size: 248 bytes, image data size: 13143
* Lossless features used: PALETTE
* Precision Bits: histogram=6 transform=5 cache=0
* Palette size: 248
~$ webpmux -set exif default.exif input.webp -o output.webp
Saved file output.webp (46224 bytes)
```
I got curious and decided to check out Ubuntu 16.04. The result was interesting
```
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
~$ webpmux -version
0.2.2
~$ cwebp -version
0.4.4
~$ webpmux -set exif default.exif input.webp -o out.webp
Saved file out.webp (49546 bytes)
```
Older version of webpmux writes exif metadata successfully and throws no errors. Please tell me why this is happening?
Attachments:
default.exif 184 bytes
input.webp 504 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