AcademySoftwareFoundation / OpenImageIO

Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
https://openimageio.readthedocs.org
Apache License 2.0
1.95k stars 585 forks source link

[BUG] Metadata lost on PNG files #2573

Closed fabiencastan closed 3 years ago

fabiencastan commented 4 years ago

Describe the bug

Many metadata are not recognized on PNG files.

To Reproduce

Compare results of iinfo and exiftool on the provided PNG file.

Expected behavior

Get access to all metadata.

Evidence

These 2 following images (1 JPG, 1 PNG) should have the same metadata keys: http://caseyconnor.org/pub/image/bugs/meshroom/IMG_8681.png http://caseyconnor.org/pub/image/bugs/meshroom/IMG_8624.jpg If we analyze them with exif tool we retrieve all metadata. If we look at it with iinfo, we get all metadata on the JPG file but only some of them on the PNG. For instance, "ICCProfile" is read properly, but some important metadata like "ExposureTime", "FNumber", "Make", "Model" etc. are missing.

> iinfo -v IMG_8681.png 
IMG_8681.png : 3476 x 5208, 3 channel, uint8 png
    channel list: R, G, B
    ICCProfile: 0, 0, 34, 236, 108, 99, 109, 115, 2, 16, 0, 0, 109, 110, 116, 114, ... [8940 x uint8]
    Raw profile type exif: "\nexif\n    5934\n45786966000049492a00080000000c000f010200060000009e0000001001020014000000\na40000001201030001000000010000001a010900010000002c0100001b01090001000000\n2c0100002801030001000000020000003101020010000000b80000003201020014000000\nc80000004647090001000000010000004947090001000000140000006987040001000000\nf00000000390020014000000dc0000000000000043616e6f6e0043616e6f6e20454f5320\n524542454c20534c31006461726b7461626c6520322e342e3400323032303a30313a3035\n2031333a32363a343300323032303a30313a30352031343a31343a31390025009a820500\n01000000b20200009d82050001000000ba02000022880300010000000100000027880300\n01000000800c00003088030001000000020000003288040001000000800c000000900700\n04000000303233300390020014000000c20200000490020014000000d602000001910700\n040000000102030001920a0001000000ea0200000292050001000000f202000004920a00\n01000000fa0200000792030001000000030000000992030001000000100000000a920500\n01000000020300007c920700981300000a03000090920200030000003235000091920200\n030000003235000092920200030000003235000000a00700040000003031303001a00300\n010000000100000002a0090001000000940d000003a00900010000005814000005a00400\n010000000a1700000ea2050001000000a21600000fa2050001000000aa16000010a20300\n010000000200000001a40300010000000000000002a40300010000000100000003a40300\n010000000100000006a40300010000000000000030a40200010000000000000031a40200\n0d000000b216000032a4050004000000c016000034a402001d000000e016000035a40200\n0b000000fe16000000000000010000007d0000000d00000001000000323032303a30313a\n30352031343a31343a313900323032303a30313a30352031343a31343a31390000000700\n000001000060070000000100000000000100000037000000010000002700010003003100\n0000e404000002000300040000004605000003000300040000004e050000040003002200\n00005605000006000200140000009a0500000700020018000000ae050000090002002000\n0000c60500000d00070000060000e6050000100004000100000046030080130003000400\n0000e60b0000190003000100000001000000260003008b000000ee0b0000350004000400\n0000040d00009300030020000000140d0000950002004a000000540d0000960002001000\n00009e0d00009700070000040000ae0d00009800030004000000ae110000990004002600\n0000b61100009a000400050000004e120000a00003000e00000062120000aa0003000600\n00007e120000d00004000100000000000000e0000300110000008a120000084003000300\n0000ac1200000940030003000000b21200001040020020000000b812000011400700fc00\n0000d81200001240020020000000d4130000134004000b000000f413000015400700c801\n0000201400001640040007000000e8150000184004000700000004160000194007001e00\n00002016000020400400070000003e160000000000000000000000000000254004000900\n00005a16000027400400060000007e1600002a4004000300000096160000000000006200\n020000000400000001000000000000000600ffff01000000fdfffeffff7fff7f01000200\n00000400ffff3210370012000100a0004c010000000000000000ffffffffffff00000000\n00000000ffffffff00000000ff7fffffffff00000000ffff000037006ff70a5500000000\n00000000440000004001b800ec000000000005000300000008000800a200000000000000\n00000000010000000000ec00e000780000000000f800ffffffffffffffff000000000000\n43616e6f6e20454f5320524542454c20534c31004669726d776172652056657273696f6e\n20312e302e31000000000000000000000000000000000000000000000000000000000000\n00000000aaaa70437043700001680192000300000000000001000006000000a29a007000\n7300750037000000000000000009030000000000010037007d01bbbb00aa550000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000001010000000000010200000000000000\n00000000000000001b001a00003f000000000004ffffffff0cdddd000000000300000001\n0000000100000070000000000000000001000001000100050000007c1500000000000000\n000000060000000600000006000000040000000400000004000000000000000100000000\n0000000000000022000000010000000100000001000000090001000300000001ffffff00\n0000000000000000000000000000000000000001305b10320012003791579a7e08ff0000\n00000000002c2cb201050017310000020000000300000000000000000000000000000000\n000000000000000100000040140000800d00001e0900000a05000004020000b0020000d0\n020000e00100000000000000000000d0020000e0010000d0020000e00100000000000000\n000000d0020000e001000000000000000000000100000000000000010000000000000000\n0000000000000000000000ffffff7fffffff7f000000000000000001007c000000000000\n0000000a0200010000000000020100000000000000010000000000000000000000000000\n00000000000001000000000001010000e0ce4d0100000090ca6e00e808fd03fd03950500\n000000015f0128000000000000000000017070700170017000003b23c00040e7c0003da3\nc000b8f7c000000000003da38000b91da0000000000023320f0431305b5901287375006f\n7f00370037001b001a040100004e00000000000000000002000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000002\n00000000000000000000001e0000000f0000000000000002000000000000000000000000\n000000312e302e310036302832332900295e000c000000747c45001802981958fe170090\nb9450000000000000000000000000000000000000000000000000000000000000000008e\n000000640000006400000000000000e82100000000000064000000650000006400000008\n000000080000000800000008000000000000000000000000000000000000000000000000\n0000000000000000000000000000009c01000400049f0200000000000000000000000000\n0000000000000000000000000000000000000000000000e3010004000494020000000000\n00000000000000000000000000000000000000000000000000000000000000e301000400\n049402000000000000000000000000000000000000000000000000000000000000000000\n000000e30100040004940200000000000000000000000000000000000000000000000000\n0000000000000000000000e3010004000494020000000001000000010000000000000000\n000000000000000100000000000000030000000000000000000000efbeaddeefbeadde00\n000000020000000000000000000000efbeaddeefbeadde00000000040000000000000000\n000000efbeaddeefbeadde00000000000000000000000000000000efbeaddeefbeadde00\n000000000000000000000000000000efbeaddeefbeadde0000000003000000efbeaddeef\nbeadde000000000000000000000000030000000000000000000000efbeaddeefbeadde00\n000000050000000000000000000000efbeaddeefbeaddefdffffff00000000feffffff00\n000000efbeaddeefbeadde00000000030000000000000000000000000000000000000084\n00850087000000ffffffffffffffff000000000000000000000000000000000000000000\n000000000000000000000000040004000400040000000000000000000000000000000000\n000000000000000000000000000000000400040004000400000000000000000000000000\n000000000000000000000000000000000000000004000400040004000000000000000000\n0000000000000000000000000000000000000000000000000400040000009f0007007000\n16010d001f0001004014800d4014800d0402000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000b00200000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000005e00000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000010000000100000000000000ffff1000000020feffff1e00\n00000000000040000000000000000000000000000000ffff00000000000000000000ffff\nffff7000ffff010001001b001a000000000000000000ffff000000003f00ffffffff4546\n2d5331382d35356d6d20662f332e352d352e362049532053544d00000000000000000000\n0000000000000000000000000000000000000000000000000000000000000000ffff6c47\n484330323235353531000000000000000100000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000009800000004000000010000002000000002000000010100000100000000000000\n030100000100000001000000020000001400000001000000030200000100000000000000\n0300000020000000020000000e05000001000000030000000f0600000100000000000000\n040000002c00000003000000010700000100000000000000040700000100000000000000\n1108000001000000010000000000000040140000800d000000000000000000001c000000\n000000000000000000000000ffff7c1522000000000000000c00150200040004e9010000\n2200a014c80d01000100540040009314bf0d000000000000000000000000000000008400\n850087000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n00002c00000000000000000000000a000000ffffffff000000000a000000000000000a00\n0000000000000a0000000021c80100000000010001000000000064006400cc104014800d\nff1f9f1f0b1f851ee31d481d0000b203ea056507df081a0a0040f23fe53fd93fd03fce3f\n0040a14002416741af41c8410000b203ea0522089d091a0ae83fe73fe53fe53fe83fe93f\n0000b203ea0522089d091a0a000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000000000000000\n000000000000000000000000000000000000000000000000000000000000370000001c00\n00000000000001000000000000000000000000000000010000001c000000010000000300\n00000000000002000000020000000100000000002c2cb200000000000000000000000000\n0000000000000000000000001c000000000000000000000000000000ffffff7f00000000\n010000002400000000000000000000000000000000000000000000000000000000000000\n000000001800000000040400230000600000000730303000000501000c00000000000000\n00000000001a4f007e03000000bc34005502000033313230373330313634373000001200\n00000100000037000000010000000000000001000000000000000100000045462d533138\n2d35356d6d20662f332e352d352e362049532053544d0000303030303263326362320000\n020001000200040000005239380002000700040000003031303000000000\n"
    darktable:auto_presets_applied: "1"
    darktable:blendop_params: "gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM="
    darktable:blendop_version: "7"
    darktable:enabled: "1"
    darktable:history_end: "7"
    darktable:modversion: "2"
    darktable:multi_priority: "0"
    darktable:operation: "nlmeans"
    darktable:params: "000040400000c84247e1fa3e0000803f"
    darktable:raw_params: "0"
    darktable:xmp_version: "2"
    IPTC:Rating: 1
    xmpMM:DerivedFrom: "IMG_8681.CR2"
> exifTool -a IMG_8681.png 
ExifTool Version Number         : 9.90
File Name                       : IMG_8681.png
File Size                       : 30 MB
File Modification Date/Time     : 2020:05:05 01:09:20+02:00
File Access Date/Time           : 2020:05:05 01:10:34+02:00
File Inode Change Date/Time     : 2020:05:05 01:09:20+02:00
File Permissions                : rw-rw-r--
File Type                       : PNG
MIME Type                       : image/png
Image Width                     : 3476
Image Height                    : 5208
Bit Depth                       : 8
Color Type                      : RGB
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : Canon
Camera Model Name               : Canon EOS REBEL SL1
Orientation                     : Horizontal (normal)
X Resolution                    : 300
Y Resolution                    : 300
Resolution Unit                 : inches
Software                        : darktable 2.4.4
Modify Date                     : 2020:01:05 13:26:43
Rating                          : 1
Rating Percent                  : 20
Exposure Time                   : 1/125
F Number                        : 13.0
Exposure Program                : Manual
ISO                             : 3200
Sensitivity Type                : Recommended Exposure Index
Recommended Exposure Index      : 3200
Exif Version                    : 0230
Date/Time Original              : 2020:01:05 14:14:19
Create Date                     : 2020:01:05 14:14:19
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/128
Aperture Value                  : 12.9
Exposure Compensation           : 0
Metering Mode                   : Spot
Flash                           : Off, Did not fire
Focal Length                    : 55.0 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : RAW
Canon Flash Mode                : Off
Continuous Drive                : Continuous
Focus Mode                      : One-shot AF
Record Mode                     : CR2
Canon Image Size                : n/a
Easy Mode                       : Manual
Digital Zoom                    : None
Contrast                        : -3
Saturation                      : -2
Metering Mode                   : Spot
Focus Range                     : Not Known
Canon Exposure Mode             : Manual
Lens Type                       : Canon EF-S 18-55mm f/3.5-5.6 IS STM
Max Focal Length                : 55 mm
Min Focal Length                : 18 mm
Focal Units                     : 1/mm
Max Aperture                    : 5.7
Min Aperture                    : 36
Flash Activity                  : 0
Flash Bits                      : (none)
Zoom Source Width               : 0
Zoom Target Width               : 0
Manual Flash Output             : n/a
Color Tone                      : Normal
SRAW Quality                    : n/a
Focal Length                    : 55 mm
Auto ISO                        : 100
Base ISO                        : 3200
Measured EV                     : 10.75
Target Aperture                 : 13
Target Exposure Time            : 1
Exposure Compensation           : 0
White Balance                   : Flash
Slow Shutter                    : None
Shot Number In Continuous Burst : 0
Optical Zoom Code               : n/a
Camera Temperature              : 34 C
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : Off
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
F Number                        : 13
Exposure Time                   : 1/128
Measured EV 2                   : 9
Bulb Duration                   : 0
Camera Type                     : EOS High-end
ND Filter                       : n/a
Canon Image Type                : Canon EOS REBEL SL1
Canon Firmware Version          : Firmware Version 1.0.1
Owner Name                      : 
Canon Model ID                  : EOS Rebel SL1 / 100D / Kiss X7
Thumbnail Image Valid Area      : 0 159 7 112
AF Area Mode                    : Flexizone Single
Num AF Points                   : 31
Valid AF Points                 : 1
Canon Image Width               : 5184
Canon Image Height              : 3456
AF Image Width                  : 5184
AF Image Height                 : 3456
AF Area Widths                  : 516 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AF Area Heights                 : 688 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AF Area X Positions             : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AF Area Y Positions             : 94 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AF Points In Focus              : 0
AF Points Selected              : 0
Time Zone                       : -08:00
Time Zone City                  : Los Angeles
Daylight Savings                : Off
Bracket Mode                    : Off
Bracket Value                   : 0
Bracket Shot Number             : 0
Raw Jpg Size                    : Large
WB Bracket Mode                 : Off
WB Bracket Value AB             : 0
WB Bracket Value GM             : 0
Live View Shooting              : On
Focus Distance Upper            : 0.27 m
Focus Distance Lower            : 0.26 m
Flash Exposure Lock             : Off
Lens Model                      : EF-S18-55mm f/3.5-5.6 IS STM
Internal Serial Number          : HC0225551
Dust Removal Data               : (Binary data 1024 bytes, use -b option to extract)
Crop Left Margin                : 0
Crop Right Margin               : 0
Crop Top Margin                 : 0
Crop Bottom Margin              : 0
Exposure Level Increments       : 1/3 Stop
ISO Expansion                   : On
Highlight Tone Priority         : Disable
AF Assist Beam                  : IR AF assist beam only
Mirror Lockup                   : Disable
Shutter Button AF On Button     : Metering + AF start
Set Button When Shooting        : Normal (disabled)
LCD Display At Power On         : Retain power off status
Aspect Ratio                    : 3:2
Cropped Image Width             : 5184
Cropped Image Height            : 3456
Cropped Image Left              : 0
Cropped Image Top               : 0
Tone Curve                      : Standard
Sharpness                       : 0
Sharpness Frequency             : n/a
Sensor Red Level                : 0
Sensor Blue Level               : 0
White Balance Red               : 0
White Balance Blue              : 0
Color Temperature               : 5500
Picture Style                   : User Def. 2
Digital Gain                    : 0
WB Shift AB                     : 0
WB Shift GM                     : 0
Measured RGGB                   : 533 1024 1024 489
VRD Offset                      : 0
Sensor Width                    : 5280
Sensor Height                   : 3528
Sensor Left Border              : 84
Sensor Top Border               : 64
Sensor Right Border             : 5267
Sensor Bottom Border            : 3519
Black Mask Left Border          : 0
Black Mask Top Border           : 0
Black Mask Right Border         : 0
Black Mask Bottom Border        : 0
Custom Picture Style File Name  : 
AF Micro Adj Mode               : Disable
AF Micro Adj Value              : 0
Vignetting Corr Version         : 0
Peripheral Lighting             : Off
Chromatic Aberration Corr       : On
Chromatic Aberration Corr       : On
Peripheral Lighting Value       : 0
Original Image Width            : 5184
Original Image Height           : 3456
Peripheral Lighting Setting     : Off
Chromatic Aberration Setting    : On
Peripheral Illumination Corr    : On
Auto Lighting Optimizer         : Off
Highlight Tone Priority         : Off
Long Exposure Noise Reduction   : On
High ISO Noise Reduction        : Strong
Lens Serial Number              : 00002c2cb2
Ambience Selection              : Standard
HDR                             : Off
HDR Effect                      : Natural
Sub Sec Time                    : 25
Sub Sec Time Original           : 25
Sub Sec Time Digitized          : 25
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3476
Exif Image Height               : 5208
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Focal Plane X Resolution        : 5798.657718
Focal Plane Y Resolution        : 5788.944724
Focal Plane Resolution Unit     : inches
Custom Rendered                 : Normal
Exposure Mode                   : Manual
White Balance                   : Manual
Scene Capture Type              : Standard
Owner Name                      : 
Serial Number                   : 312073016470
Lens Info                       : 18-55mm f/0
Lens Model                      : EF-S18-55mm f/3.5-5.6 IS STM
Lens Serial Number              : 00002c2cb2
Date/Time Original              : 2020:01:05 14:14:19
XMP Toolkit                     : XMP Core 4.4.0-Exiv2
Rating                          : 1
Derived From                    : IMG_8681.CR2
Xmp version                     : 2
Raw params                      : 0
Auto presets applied            : 1
History end                     : 7
Mask id                         : 
Mask type                       : 
Mask name                       : 
Mask version                    : 
Mask                            : 
Mask nb                         : 
Mask src                        : 
History Operation               : flip
History Enabled                 : 1
History Modversion              : 2
History Params                  : ffffffff
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : sharpen
History Enabled                 : 1
History Modversion              : 1
History Params                  : 000000400000003f0000003f
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : basecurve
History Enabled                 : 1
History Modversion              : 5
History Params                  : gz09eJxjYIAAM6vnNnqyn22E9n235b6aa3cy6rVdRaK9/Y970fYf95bbMzA0QPEoGEqADYnNhCELiVMAudcSGA==
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : flip
History Enabled                 : 1
History Modversion              : 2
History Params                  : ffffffff
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : sharpen
History Enabled                 : 1
History Modversion              : 1
History Params                  : 000000400000003f0000003f
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : basecurve
History Enabled                 : 1
History Modversion              : 5
History Params                  : gz09eJxjYIAAM6vnNnqyn22E9n235b6aa3cy6rVdRaK9/Y970fYf95bbMzA0QPEoGEqADYnNhCELiVMAudcSGA==
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
History Operation               : nlmeans
History Enabled                 : 1
History Modversion              : 2
History Params                  : 000040400000c84247e1fa3e0000803f
History Multi name              : 
History Multi priority          : 0
History Blendop version         : 7
History Blendop params          : gz12eJxjYGBgkGAAgRNODESDBnsIHll8ANNSGQM=
Profile Name                    : sRGB
Profile CMM Type                : lcms
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2020:01:05 21:25:47
Profile File Signature          : acsp
Primary Platform                : Apple Computer Inc.
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : 
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : lcms
Profile ID                      : 0
Profile Copyright               : Public Domain
Profile Description             : sRGB
Device Mfg Desc                 : Darktable
Device Model Desc               : sRGB
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43604 0.22249 0.01392
Green Matrix Column             : 0.38512 0.7169 0.09706
Blue Matrix Column              : 0.14305 0.06061 0.71393
Red Tone Reproduction Curve     : (Binary data 8204 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 8204 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 8204 bytes, use -b option to extract)
Aperture                        : 13.0
Drive Mode                      : Continuous Shooting
ISO                             : 3200
Image Size                      : 3476x5208
Lens                            : 18.0 - 55.0 mm
Lens ID                         : Canon EF-S 18-55mm f/3.5-5.6 IS STM
Megapixels                      : 18.1
Scale Factor To 35 mm Equivalent: 1.6
Shooting Mode                   : Manual
Shutter Speed                   : 1/125
Create Date                     : 2020:01:05 14:14:19.25
Date/Time Original              : 2020:01:05 14:14:19.25
Modify Date                     : 2020:01:05 13:26:43.25
Circle Of Confusion             : 0.019 mm
Field Of View                   : 23.3 deg
Focal Length                    : 55.0 mm (35 mm equivalent: 87.2 mm)
Hyperfocal Distance             : 12.27 m
Lens                            : 18.0 - 55.0 mm (35 mm equivalent: 28.5 - 87.2 mm)
Light Value                     : 9.4

The issue has been reported on Meshroom: https://github.com/alicevision/meshroom/issues/751

Platform information:

milasudril commented 3 years ago

It looks like at least colorspace is missing when using OpenImageIO 2.1.12 on Ubuntu 20.04

milasudril commented 3 years ago

Regarding the colorspace issue, this looks correct to me

int srgb_intent;
if (png_get_sRGB(sp, ip, &srgb_intent)) {
    spec.attribute("oiio:ColorSpace", "sRGB");
}

This would need some testing I think.

lgritz commented 3 years ago

Try #2767 for what I think is a complete fix (for reading PNG, not writing yet).

lgritz commented 3 years ago

I merged #2767, and that should fix this issue -- full Exif ought to read properly from PNGs now.