I've got a TIFF file with a certain set of tags. When I convert this file to fix the offset of ICC metadata (not word-aligned), I get a whole different set of tags. Why does this happen and how can I preserve original metadata?Converting:convert original.tif fixed.tiffMissing tags:Software (305)DateTime (306)Artist (315)New Tags:Whitepoint (318)PrimaryChromaticities (319)Full output of tiffdump:$ tiffdump original.tif                                                                                                                         original.tif:                                                                                                                                       Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>                                                                                                    Directory 0: offset 8 (0x8) next 0 (0)                                                                                                                       SubFileType (254) LONG (4) 1<2>                                                                                                                              ImageWidth (256) LONG (4) 1<2370>                                                                                                                            ImageLength (257) LONG (4) 1<3334>                                                                                                                           BitsPerSample (258) SHORT (3) 3<8 8 8>                                                                                                                       Compression (259) SHORT (3) 1<1>                                                                                                                             Photometric (262) SHORT (3) 1<2>                                                                                                                             FillOrder (266) SHORT (3) 1<1>                                                                                                                               StripOffsets (273) LONG (4) 1<125459>                                                                                                                        Orientation (274) SHORT (3) 1<1>                                                                                                                             SamplesPerPixel (277) SHORT (3) 1<3>                                                                                                                         RowsPerStrip (278) SHORT (3) 1<3334>                                                                                                                         StripByteCounts (279) LONG (4) 1<23704740>                                                                                                                   XResolution (282) RATIONAL (5) 1<400>                                                                                                                        YResolution (283) RATIONAL (5) 1<400>                                                                                                                        PlanarConfig (284) SHORT (3) 1<1>                                                                                                                            ResolutionUnit (296) SHORT (3) 1<2>                                                                                                                          PageNumber (297) SHORT (3) 2<0 1>                                                                                                                            Software (305) ASCII (2) 30<Some software...>                                                                                                    DateTime (306) ASCII (2) 20<2009:07:01 10:46:50\0>                                                                                                           Artist (315) ASCII (2) 37<Some creator...>                                                                                                      ICC Profile (34675) UNDEFINED (7) 125084<00 0x1 0xe8 0x9c 0x41 0x50 0x50 0x4c 0x2 0x40 00 00 0x73 0x63 0x6e 0x72 0x52 0x47 0x42 0x20 0x4c 0x61 0x62 0x20 ...>$ tiffdump fixed.tiff                                                                                                                                                                fixed.tiff:                                                                                                                                                                              Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>                                                                                                                                Directory 0: offset 23704748 (0x169b4ac) next 0 (0)                                                                                                                                      ImageWidth (256) SHORT (3) 1<2370>                                                                                                                                                       ImageLength (257) SHORT (3) 1<3334>                                                                                                                                                      BitsPerSample (258) SHORT (3) 3<8 8 8>                                                                                                                                                   Compression (259) SHORT (3) 1<1>                                                                                                                                                         Photometric (262) SHORT (3) 1<2>                                                                                                                                                         FillOrder (266) SHORT (3) 1<1>                                                                                                                                                           StripOffsets (273) LONG (4) 3334<8 7118 14228 21338 28448 35558 42668 49778 56888 63998 71108 78218 85328 92438 99548 106658 113768 120878 127988 135098 142208 149318 156428 163538 ...>Orientation (274) SHORT (3) 1<1>                                                                                                                                                         SamplesPerPixel (277) SHORT (3) 1<3>                                                                                                                                                     RowsPerStrip (278) SHORT (3) 1<1>                                                                                                                                                        StripByteCounts (279) LONG (4) 3334<7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 7110 ...>                         XResolution (282) RATIONAL (5) 1<400>                                                                                                                                                    YResolution (283) RATIONAL (5) 1<400>                                                                                                                                                    PlanarConfig (284) SHORT (3) 1<1>                                                                                                                                                        ResolutionUnit (296) SHORT (3) 1<2>                                                                                                                                                      PageNumber (297) SHORT (3) 2<0 1>                                                                                                                                                        Whitepoint (318) RATIONAL (5) 2<0.3127 0.329>                                                                                                                                            PrimaryChromaticities (319) RATIONAL (5) 6<0.64 0.33 0.3 0.6 0.15 0.06>                                                                                                                  ICC Profile (34675) UNDEFINED (7) 125084<00 0x1 0xe8 0x9c 0x41 0x50 0x50 0x4c 0x2 0x40 00 00 0x73 0x63 0x6e 0x72 0x52 0x47 0x42 0x20 0x4c 0x61 0x62 0x20 ...>                            I'm using a recent installation of Imagemagick and libtiff under Cygwin.
Why does Imagemagick's convert change TIFF metadata?
imagemagick