metadata lost in operation

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mikmach
Posts: 42
Joined: 2015-02-06T07:50:43-07:00
Authentication code: 6789

metadata lost in operation

Post by mikmach »

Hello,

In clone operation I've discussed here:

viewtopic.php?f=1&t=29184

I discovered that image has lost metadata tag: Exif's Camera Date/Time (as reported by exiftool).

Is it bug or feature? To make things clear: for me it is bug, very serious bug. IM should preserve all metadata unless told otherwise.
mikmach
Posts: 42
Joined: 2015-02-06T07:50:43-07:00
Authentication code: 6789

Re: metadata lost in operation

Post by mikmach »

IM version data:

Version: ImageMagick 6.9.3-0 Q16 x64 2016-01-02 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: metadata lost in operation

Post by dlemstra »

Can you upgrade to the latest version of ImageMagick and test if that resolves your issue? And can you share your input image if the issue is not resolved so we can investigate this?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: metadata lost in operation

Post by glennrp »

In the other discussion you are talking about doing a composite operation with some clones. I guess you are expecting the metadata to be preserved in each clone and then propogated from one of the clones to the output image, correct?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: metadata lost in operation

Post by fmw42 »

My understanding is that the meta data is only passed from the first input image to the output. One of the IM developers can correct me if I am wrong.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: metadata lost in operation

Post by magick »

All metadata is copied to any cloned image. We use reference-counting for the pixel cache only. That is, multiple cloned images may point to a single pixel cache instance. The pixel cache is copied when the pixels are updated (copy-on-write) rather than read. See http://www.imagemagick.org/script/archi ... .php#cache for details.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: metadata lost in operation

Post by fmw42 »

magick wrote:All metadata is copied to any cloned image. We use reference-counting for the pixel cache only. That is, multiple cloned images may point to a single pixel cache instance. The pixel cache is copied when the pixels are updated (copy-on-write) rather than read. See http://www.imagemagick.org/script/archi ... .php#cache for details.
Please clarify what happens if you have multiple input images such as when compositing. Doesn't the output inherit from only the first input?
mikmach
Posts: 42
Joined: 2015-02-06T07:50:43-07:00
Authentication code: 6789

Re: metadata lost in operation

Post by mikmach »

Thank you for all your responses and now my answers:

Tested with newest 6.9.3-5 - still the same.

Yes, I want to information to be preserved between clones and while it may be controversial what is preserved when clones are from different sources it should be definitely preserved when all clones (layers) are coming from one file.

Also there is one strong hint this is bug not feature: data in IPTC and XMP is preserved, only Exif is destroyed and in my context all three metadata spaces are equally important.

Link to WeTransfer (valid till 2nd March):

https://www.wetransfer.com/downloads/0e ... 717/4d699c

Two files, -orig - original, -im after IM processing

Output of exiftool -G from original file.

Code: Select all

[ExifTool]      ExifTool Version Number         : 9.78
[File]          File Name                       : grpol6506-orig.tif
[File]          Directory                       : J:/prep-ss/test
[File]          File Size                       : 20 MB
[File]          File Modification Date/Time     : 2016:02:19 07:27:02+01:00
[File]          File Access Date/Time           : 2016:02:19 07:27:02+01:00
[File]          File Creation Date/Time         : 2016:02:24 10:11:59+01:00
[File]          File Permissions                : rw-rw-rw-
[File]          File Type                       : TIFF
[File]          MIME Type                       : image/tiff
[File]          Exif Byte Order                 : Little-endian (Intel, II)
[File]          Current IPTC Digest             : ae8eb026fbb6c4fc432dc2cbcf62381d
[EXIF]          Image Width                     : 3408
[EXIF]          Image Height                    : 3648
[EXIF]          Bits Per Sample                 : 8 8 8
[EXIF]          Compression                     : LZW
[EXIF]          Photometric Interpretation      : RGB
[EXIF]          Fill Order                      : Normal
[EXIF]          Strip Offsets                   : (Binary data 30994 bytes, use -b option to extract)
[EXIF]          Orientation                     : Horizontal (normal)
[EXIF]          Samples Per Pixel               : 3
[EXIF]          Rows Per Strip                  : 1
[EXIF]          Strip Byte Counts               : (Binary data 18239 bytes, use -b option to extract)
[EXIF]          X Resolution                    : 600
[EXIF]          Y Resolution                    : 600
[EXIF]          Planar Configuration            : Chunky
[EXIF]          Resolution Unit                 : inches
[EXIF]          Page Number                     : 0 1
[EXIF]          Predictor                       : Horizontal differencing
[EXIF]          White Point                     : 0.3127000035 0.3289999963
[EXIF]          Primary Chromaticities          : 0.6399999858 0.3300000132 0.300000012 0.600000024 0.150000006 0.05999999867
[EXIF]          Exif Version                    : 0230
[EXIF]          Date/Time Original              : 2016:02:19 07:27:02
[EXIF]          Components Configuration        : Y, Cb, Cr, -
[EXIF]          Flashpix Version                : 0100
[EXIF]          Color Space                     : Uncalibrated
[XMP]           XMP Toolkit                     : XMP Core 4.4.0
[XMP]           Native Digest                   : 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;BF420FED9350312F59275686EF28F6CE
[XMP]           Camera Model Name               : OS14000_A1 56276
[XMP]           Make                            : Scanner Zeutschel
[XMP]           Modify Date                     : 2016:02:19 07:26:58+01:00
[XMP]           Creator Tool                    : FotoWare FotoStation
[XMP]           Exif Image Width                : 3408
[XMP]           Exif Image Height               : 3648
[XMP]           ICC Profile Name                : OS14000_A1_B8_mG
[XMP]           Color Mode                      : RGB
[XMP]           Has Crop                        : False
[XMP]           XMP File Stamps                 : 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00
[XMP]           Creator                         : Muzeum Narodowe w Warszawie
[XMP]           Rights                          : © Copyright by Muzeum Narodowe w Warszawie
[IPTC]          Application Record Version      : 2
[IPTC]          Originating Program             : FotoWare FotoStation
[IPTC]          By-line                         : Muzeum Narodowe w Warszawie
[IPTC]          Source                          : Tywonek Krzysztof
[IPTC]          Copyright Notice                : © Copyright by Muzeum Narodowe w Warszawie
[Photoshop]     Alpha Channels Names            : 
[Photoshop]     Copyright Flag                  : False
[Photoshop]     IPTC Digest                     : 2f3a8074248a66360ba8bb16211efc77
[ICC_Profile]   Profile CMM Type                : APPL
[ICC_Profile]   Profile Version                 : 2.4.0
[ICC_Profile]   Profile Class                   : Input Device Profile
[ICC_Profile]   Color Space Data                : RGB
[ICC_Profile]   Profile Connection Space        : Lab
[ICC_Profile]   Profile Date Time               : 2011:12:21 12:01:12
[ICC_Profile]   Profile File Signature          : acsp
[ICC_Profile]   Primary Platform                : Microsoft Corporation
[ICC_Profile]   CMM Flags                       : Not Embedded, Independent
[ICC_Profile]   Device Manufacturer             : 
[ICC_Profile]   Device Model                    : 
[ICC_Profile]   Device Attributes               : Reflective, Glossy, Positive, Color
[ICC_Profile]   Rendering Intent                : Perceptual
[ICC_Profile]   Connection Space Illuminant     : 0.9642 1 0.82491
[ICC_Profile]   Profile Creator                 : LOGO
[ICC_Profile]   Profile ID                      : 0
[ICC_Profile]   Profile Copyright               : Copyright by LOGO GmbH, Steinfurt
[ICC_Profile]   Red Matrix Column               : 0.40147 0.16315 0
[ICC_Profile]   Green Matrix Column             : 0.54288 0.80528 0.03108
[ICC_Profile]   Blue Matrix Column              : 0.01985 0.03157 0.79381
[ICC_Profile]   Media White Point               : 0.9642 1 0.82491
[ICC_Profile]   Media Black Point               : 0 0 0
[ICC_Profile]   A To B0                         : (Binary data 221806 bytes, use -b option to extract)
[ICC_Profile]   A To B2                         : (Binary data 221806 bytes, use -b option to extract)
[ICC_Profile]   A To B1                         : (Binary data 221806 bytes, use -b option to extract)
[ICC_Profile]   Red Tone Reproduction Curve     : (Binary data 1034 bytes, use -b option to extract)
[ICC_Profile]   Green Tone Reproduction Curve   : (Binary data 1034 bytes, use -b option to extract)
[ICC_Profile]   Blue Tone Reproduction Curve    : (Binary data 1034 bytes, use -b option to extract)
[ICC_Profile]   Profile Description             : OS14000_A1_B8_mG
[Composite]     Image Size                      : 3408x3648
Output of exiftool -G after IM processing

Code: Select all

[ExifTool]      ExifTool Version Number         : 9.78
[ExifTool]      Warning                         : Bad IPTC data tag (marker 0x20)
[File]          File Name                       : grpol6506-im.tif
[File]          Directory                       : J:/adobe-hot
[File]          File Size                       : 20 MB
[File]          File Modification Date/Time     : 2016:02:24 10:12:35+01:00
[File]          File Access Date/Time           : 2016:02:24 10:12:34+01:00
[File]          File Creation Date/Time         : 2016:02:24 10:12:34+01:00
[File]          File Permissions                : rw-rw-rw-
[File]          File Type                       : TIFF
[File]          MIME Type                       : image/tiff
[File]          Exif Byte Order                 : Little-endian (Intel, II)
[File]          Current IPTC Digest             : 3f7124f77f07095d1f00cd48bfbc4b29
[EXIF]          Image Width                     : 3408
[EXIF]          Image Height                    : 3648
[EXIF]          Bits Per Sample                 : 8 8 8
[EXIF]          Compression                     : LZW
[EXIF]          Photometric Interpretation      : RGB
[EXIF]          Fill Order                      : Normal
[EXIF]          Strip Offsets                   : (Binary data 30777 bytes, use -b option to extract)
[EXIF]          Orientation                     : Horizontal (normal)
[EXIF]          Samples Per Pixel               : 3
[EXIF]          Rows Per Strip                  : 1
[EXIF]          Strip Byte Counts               : (Binary data 18239 bytes, use -b option to extract)
[EXIF]          X Resolution                    : 600
[EXIF]          Y Resolution                    : 600
[EXIF]          Planar Configuration            : Chunky
[EXIF]          Resolution Unit                 : inches
[EXIF]          Page Number                     : 0 1
[EXIF]          Predictor                       : Horizontal differencing
[EXIF]          White Point                     : 0.3127000035 0.3289999963
[EXIF]          Primary Chromaticities          : 0.6399999858 0.3300000132 0.300000012 0.600000024 0.150000006 0.05999999867
[XMP]           XMP Toolkit                     : XMP Core 4.4.0
[XMP]           Native Digest                   : 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;BF420FED9350312F59275686EF28F6CE
[XMP]           Camera Model Name               : OS14000_A1 56276
[XMP]           Make                            : Scanner Zeutschel
[XMP]           Modify Date                     : 2016:02:19 07:26:58+01:00
[XMP]           Creator Tool                    : FotoWare FotoStation
[XMP]           Exif Image Width                : 3408
[XMP]           Exif Image Height               : 3648
[XMP]           ICC Profile Name                : OS14000_A1_B8_mG
[XMP]           Color Mode                      : RGB
[XMP]           Has Crop                        : False
[XMP]           XMP File Stamps                 : 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00, 2016:02:24 10:11:35+01:00
[XMP]           Creator                         : Muzeum Narodowe w Warszawie
[XMP]           Rights                          : © Copyright by Muzeum Narodowe w Warszawie
[IPTC]          Application Record Version      : 2
[IPTC]          Originating Program             : FotoWare FotoStation
[IPTC]          By-line                         : Muzeum Narodowe w Warszawie
[IPTC]          Source                          : Tywonek Krzysztof
[IPTC]          Copyright Notice                : © Copyright by Muzeum Narodowe w Warszawie
[Photoshop]     Alpha Channels Names            : 
[Photoshop]     Copyright Flag                  : False
[Photoshop]     IPTC Digest                     : 2f3a8074248a66360ba8bb16211efc77
[ICC_Profile]   Profile CMM Type                : ADBE
[ICC_Profile]   Profile Version                 : 2.1.0
[ICC_Profile]   Profile Class                   : Display Device Profile
[ICC_Profile]   Color Space Data                : RGB
[ICC_Profile]   Profile Connection Space        : XYZ
[ICC_Profile]   Profile Date Time               : 2000:08:11 19:51:59
[ICC_Profile]   Profile File Signature          : acsp
[ICC_Profile]   Primary Platform                : Apple Computer Inc.
[ICC_Profile]   CMM Flags                       : Not Embedded, Independent
[ICC_Profile]   Device Manufacturer             : none
[ICC_Profile]   Device Model                    : 
[ICC_Profile]   Device Attributes               : Reflective, Glossy, Positive, Color
[ICC_Profile]   Rendering Intent                : Perceptual
[ICC_Profile]   Connection Space Illuminant     : 0.9642 1 0.82491
[ICC_Profile]   Profile Creator                 : ADBE
[ICC_Profile]   Profile ID                      : 0
[ICC_Profile]   Profile Copyright               : Copyright 2000 Adobe Systems Incorporated
[ICC_Profile]   Profile Description             : Adobe RGB (1998)
[ICC_Profile]   Media White Point               : 0.95045 1 1.08905
[ICC_Profile]   Media Black Point               : 0 0 0
[ICC_Profile]   Red Tone Reproduction Curve     : (Binary data 14 bytes, use -b option to extract)
[ICC_Profile]   Green Tone Reproduction Curve   : (Binary data 14 bytes, use -b option to extract)
[ICC_Profile]   Blue Tone Reproduction Curve    : (Binary data 14 bytes, use -b option to extract)
[ICC_Profile]   Red Matrix Column               : 0.60974 0.31111 0.01947
[ICC_Profile]   Green Matrix Column             : 0.20528 0.62567 0.06087
[ICC_Profile]   Blue Matrix Column              : 0.14919 0.06322 0.74457
[Composite]     Image Size                      : 3408x3648

mikmach
Posts: 42
Joined: 2015-02-06T07:50:43-07:00
Authentication code: 6789

Re: metadata lost in operation

Post by mikmach »

Returning to this problem.

Narrowed problem a bit. Below are Exif fields affected, they are not changed/updated but removed completely. Their counterparts in IIM (IPTC) and XMP are preserved:

Code: Select all

[EXIF]          Artist
[EXIF]          Color Space
[EXIF]          Components Configuration
[EXIF]          Copyright
[EXIF]          Date/Time Original
[EXIF]          Exif Version
[EXIF]          Flashpix Version
[EXIF]          Modify Date
[EXIF]          Software
IM version:

Code: Select all

Version: ImageMagick 6.9.3-5 Q8 x64 2016-02-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
Post Reply