qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

some metadata not imported from PNG by 'cwebp' #158

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The attached PNG (supplied by original reporter Brendan Bolles)
has some metadata reported by exiftool,
that cwebp doesn't seem to be able to parse correctly.
Tested with 0.3.1, the png_get_text() call only reports the
following chunks:
#0 [File Name]
#1 [Software]
#2 [Writer]

Whereas exiftool reports:
 exiftool Blobbies_bluralpha.png 
ExifTool Version Number         : 8.60
Directory                       : .
File Size                       : 1339 kB
File Modification Date/Time     : 2013:06:24 13:27:10+02:00
File Permissions                : rw-r-----
File Type                       : PNG
MIME Type                       : image/png
Image Width                     : 1040
Image Height                    : 1040
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
SRGB Rendering                  : Perceptual
Pixels Per Unit X               : 2835
Pixels Per Unit Y               : 2835
Pixel Units                     : Meters
Modify Date                     : 2013:06:22 09:21:03
File Name                       : Blobbies_lossless.webp
XMP Toolkit                     : Adobe XMP Core 5.3-c011 66.145661, 
2012/02/06-14:56:27
Format                          : image/png
Description                     : ProEXR File Description..=Attributes=.capDate 
(string): "2004:01:19 12:55:33".channels (chlist).chromaticities 
(chromaticities): r(0.62955, 0.341) g(0.2867, 0.6108) b(0.1489, 0.07125) 
w(0.3155, 0.33165) .compression (compression): Zip16.dataWindow (box2i): [-20, 
-20, 1019, 1019].displayWindow (box2i): [0, 0, 999, 999].lineOrder (lineOrder): 
Decreasing Y.owner (string): "Copyright 2004 Industrial Light & 
Magic".pixelAspectRatio (float): 1.preview (preview).screenWindowCenter (v2f): 
[0, 0].screenWindowWidth (float): 1.type (string): "scanlineimage".utcOffset 
(float): 28800.whiteLuminance (float): 50..=Channels=.A (half).B (half).G 
(half).R (half).Z (float).
History Action                  : converted, saved, converted, derived, saved, 
converted, saved, derived, saved
History Parameters              : from image/exr to 
application/vnd.adobe.photoshop, from image/exr to image/png, converted from 
application/vnd.adobe.photoshop to image/png, from image/png to 
application/vnd.adobe.photoshop, converted from application/vnd.adobe.photoshop 
to image/png
History Instance ID             : xmp.iid:03801174072068118083D2E0928FA08A, 
xmp.iid:04801174072068118083D2E0928FA08A, 
xmp.iid:F77F117407206811822AE34AB482477A, 
xmp.iid:F87F117407206811822AE34AB482477A
History When                    : 2013:06:22 08:04:28-07:00, 2013:06:22 
08:04:28-07:00, 2013:06:22 09:20:59-07:00, 2013:06:22 09:20:59-07:00
History Software Agent          : Adobe Photoshop CS6 (Macintosh), Adobe 
Photoshop CS6 (Macintosh), Adobe Photoshop CS6 (Macintosh), Adobe Photoshop CS6 
(Macintosh)
History Changed                 : /, /, /, /
Derived From Instance ID        : xmp.iid:F77F117407206811822AE34AB482477A
Derived From Document ID        : xmp.did:F77F117407206811822AE34AB482477A
Derived From Original Document ID: xmp.did:03801174072068118083D2E0928FA08A
Document ID                     : xmp.did:F77F117407206811822AE34AB482477A
Instance ID                     : xmp.iid:F87F117407206811822AE34AB482477A
Original Document ID            : xmp.did:03801174072068118083D2E0928FA08A
Create Date                     : 2004:02:05 03:25:48-08:00
Metadata Date                   : 2013:06:22 09:20:59-07:00
Creator Tool                    : Adobe Photoshop CS6 (Macintosh)
Color Mode                      : RGB
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Color Space                     : sRGB
Exif Image Width                : 1040
Exif Image Height               : 1040
Software                        : Adobe Photoshop
Writer                          : SuperPNG
Image Size                      : 1040x1040

Original issue reported on code.google.com by pascal.m...@gmail.com on 24 Jun 2013 at 11:56

Attachments:

GoogleCodeExporter commented 8 years ago
The XMP in this image is in an iTxt chunk. The code is present in pngdec.c 
under '#ifdef PNG_iTXt_SUPPORTED'. With a build targeting a local libpng I'm 
able to extract this:

Metadata:
  * XMP data:      18533 bytes

Original comment by jz...@google.com on 26 Jun 2013 at 6:37

GoogleCodeExporter commented 8 years ago
so, shall this bug be considered fixed/WAI?

Original comment by pascal.m...@gmail.com on 21 Nov 2013 at 4:06

GoogleCodeExporter commented 8 years ago
This is working as intended in the sense that with the proper build environment 
the code works. Still our binary releases should attempt to expose all 
available features.

Original comment by jz...@google.com on 22 Nov 2013 at 2:44