Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 520 by roman...@
gmail.com: Custom meta information is lost when converting
https://bugs.chromium.org/p/webp/issues/detail?id=520I am adding my own property for images uploaded to my server. The "my_custom_property" property contains json with settings for displaying watermarks.
Here is the complete information about the picture:
➜ identify -verbose 1.png
Image:
Filename: 1.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 1000x1000+0+0
Resolution: 118.11x118.11
Print size: 8.46668x8.46668
Units: PixelsPerCentimeter
Colorspace: sRGB
Type: TrueColor
Base type: Undefined
Endianness: Undefined
Depth: 8-bit
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Pixels: 1000000
Red:
min: 0 (0)
max: 255 (1)
mean: 228.191 (0.894868)
median: 255 (1)
standard deviation: 48.0874 (0.188578)
kurtosis: 9.16406
skewness: -3.05655
entropy: 0.708655
Green:
min: 0 (0)
max: 255 (1)
mean: 214.664 (0.841821)
median: 255 (1)
standard deviation: 57.5566 (0.225712)
kurtosis: 3.17187
skewness: -1.88935
entropy: 0.766894
Blue:
min: 0 (0)
max: 255 (1)
mean: 218.099 (0.855291)
median: 255 (1)
standard deviation: 58.1385 (0.227994)
kurtosis: 5.50993
skewness: -2.44278
entropy: 0.758478
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 220.318 (0.863993)
median: 255 (1)
standard deviation: 54.5941 (0.214095)
kurtosis: 5.44447
skewness: -2.40055
entropy: 0.744676
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 1000x1000+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Profiles:
Profile-icc: 560 bytes
Properties:
date:create: 2021-05-12T03:45:33+00:00
date:modify: 2021-05-12T03:45:33+00:00
icc:copyright: Copyright 1999 Adobe Systems Incorporated
icc:description: Adobe RGB (1998)
my_custom_property: {"foo":"bar"}
png:bKGD: chunk was found (see Background color, above)
png:cHRM: chunk was found (see Chromaticity, above)
png:iCCP: chunk was found
png:IHDR.bit-depth-orig: 8
png:IHDR.bit_depth: 8
png:IHDR.color-type-orig: 2
png:IHDR.color_type: 2 (Truecolor)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1000, 1000
png:pHYs: x_res=11811, y_res=11811, units=1
png:text: 6 tEXt/zTXt/iTXt chunks were found
png:text-encoded profiles: 1 were found
signature: 46de946cab144f67e7d304fc953783cd67bd190eadc7e5e9d573e9c68060c39c
Artifacts:
verbose: true
Tainted: False
Filesize: 1.3099MiB
Number pixels: 1000000
Pixels per second: 26.291MP
User time: 0.040u
Elapsed time: 0:01.038
Version: ImageMagick 7.0.11-7 Q16 x86_64 2021-04-12
https://imagemagick.orgI am doing a png to webp conversion:
➜ webp cwebp -metadata all -lossless 1.png -o 1.webp
Saving file '1.webp'
File: 1.png
Dimension: 1000 x 1000
Output: 1053234 bytes (8.43 bpp)
Lossless-ARGB compressed size: 1053234 bytes
* Header size: 7692 bytes, image data size: 1045516
* Lossless features used: PREDICTION CROSS-COLOR-TRANSFORM SUBTRACT-GREEN
* Precision Bits: histogram=5 transform=5 cache=10
Metadata:
* ICC profile: 560 bytes
Got the result:
➜ identify -verbose 1.webp
Image:
Filename: 1.webp
Format: WEBP (WebP Image Format)
Mime type: image/webp
Class: DirectClass
Geometry: 1000x1000+0+0
Units: Undefined
Colorspace: sRGB
Type: TrueColor
Base type: Undefined
Endianness: Undefined
Depth: 8-bit
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Pixels: 1000000
Red:
min: 0 (0)
max: 255 (1)
mean: 228.191 (0.894868)
median: 255 (1)
standard deviation: 48.0874 (0.188578)
kurtosis: 9.16406
skewness: -3.05655
entropy: 0.708655
Green:
min: 0 (0)
max: 255 (1)
mean: 214.664 (0.841821)
median: 255 (1)
standard deviation: 57.5566 (0.225712)
kurtosis: 3.17187
skewness: -1.88935
entropy: 0.766894
Blue:
min: 0 (0)
max: 255 (1)
mean: 218.099 (0.855291)
median: 255 (1)
standard deviation: 58.1385 (0.227994)
kurtosis: 5.50993
skewness: -2.44278
entropy: 0.758478
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 220.318 (0.863993)
median: 255 (1)
standard deviation: 54.5941 (0.214095)
kurtosis: 5.44447
skewness: -2.40055
entropy: 0.744676
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 1000x1000+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Quality: 100
Orientation: Undefined
Properties:
date:create: 2021-05-12T03:50:21+00:00
date:modify: 2021-05-12T03:50:21+00:00
signature: 46de946cab144f67e7d304fc953783cd67bd190eadc7e5e9d573e9c68060c39c
Artifacts:
verbose: true
Tainted: False
Filesize: 1053820B
Number pixels: 1000000
Pixels per second: 24.4613MP
User time: 0.040u
Elapsed time: 0:01.040
Version: ImageMagick 7.0.11-7 Q16 x86_64 2021-04-12
https://imagemagick.orglooks like the "my_custom_property" property has been removed. exiftool doesn't find either
➜ exiftool --tagsFromFile 1.webp
ExifTool Version Number : 10.80
File Name : 1.webp
Directory : .
File Size : 1029 kB
File Modification Date/Time : 2021:05:12 11:02:10+07:00
File Access Date/Time : 2021:05:12 10:54:46+07:00
File Inode Change Date/Time : 2021:05:12 11:02:10+07:00
File Permissions : rw-rw-r--
File Type : WEBP
File Type Extension : webp
MIME Type : image/webp
Profile CMM Type : Adobe Systems Inc.
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1999:06:03 00:00:00
Profile File Signature : acsp
Primary Platform : Apple Computer Inc.
CMM Flags : Not Embedded, Independent
Device Manufacturer : none
Device Model :
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Adobe Systems Inc.
Profile ID : 0
Profile Copyright : Copyright 1999 Adobe Systems Incorporated
Profile Description : Adobe RGB (1998)
Media White Point : 0.95045 1 1.08905
Media Black Point : 0 0 0
Red Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Red Matrix Column : 0.60974 0.31111 0.01947
Green Matrix Column : 0.20528 0.62567 0.06087
Blue Matrix Column : 0.14919 0.06322 0.74457
Image Width : 1000
Image Height : 1000
Image Size : 1000x1000
Megapixels : 1.0
I am using this software:
➜ uname -a
Linux roman-pc 5.4.0-72-generic #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
➜ cwebp -version
1.2.0
➜ /sbin/ldconfig -p | grep libwebp
libwebpmux.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwebpmux.so.3
libwebpdemux.so.2 (libc6,x86-64) => /usr/local/lib/libwebpdemux.so.2
libwebpdemux.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwebpdemux.so.2
libwebpdemux.so (libc6,x86-64) => /usr/local/lib/libwebpdemux.so
libwebp.so.7 (libc6,x86-64) => /usr/local/lib/libwebp.so.7
libwebp.so.6 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwebp.so.6
libwebp.so (libc6,x86-64) => /usr/local/lib/libwebp.so
➜ apt list --installed | grep webp
libwebp6/bionic,now 0.6.1-2 amd64 [installed]
libwebpdemux2/bionic,now 0.6.1-2 amd64 [installed]
libwebpmux3/bionic,now 0.6.1-2 amd64 [installed]
webp/bionic,now 0.6.1-2 amd64 [installed]
How to preserve "my_custom_property" when converting images to webp?
--
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