How to preserve IPTC/XMP metadata when compositing?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to preserve IPTC/XMP metadata when compositing?

Post by snibgo »

Gimp, IM convert and IM identify all can't open 1024_Alpha_Checkers_lrg.tga. That's where the problem is.

For creating a checkerboard in IM, see "pattern:checkerboard" in http://www.imagemagick.org/Usage/canvas/ You can save the image as tga, tiff, png or any format you want.

For completeness, I'll add that, yes, exiftool -a -u -g1 shows a problem in the file you converted (from the bad checkerboard) but not in my conversion (from red).
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to preserve IPTC/XMP metadata when compositing?

Post by fmw42 »

This seems to work fine in IM 6.8.0.10 Q16 Mac OSX Snow Leopard


convert logo: -transparent white logot.tga

identify -verbose logot.tga

Code: Select all

Image: logot.tga
  Format: TGA (Truevision Targa image)
  Class: DirectClass
  Geometry: 640x480+0+0
  Units: Undefined
  Type: PaletteAlpha
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
    alpha: 1-bit
  Channel statistics:
    Red:
      min: 4 (0.0156863)
      max: 255 (1)
      mean: 229.323 (0.899307)
      standard deviation: 69.3423 (0.271931)
      kurtosis: 4.45973
      skewness: -2.49768
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 226.217 (0.887127)
      standard deviation: 70.8689 (0.277917)
      kurtosis: 3.37246
      skewness: -2.24758
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 229.064 (0.898288)
      standard deviation: 64.1018 (0.251379)
      kurtosis: 4.65272
      skewness: -2.42185
    Alpha:
      min: 0 (0)
      max: 255 (1)
      mean: 42.2975 (0.165872)
      standard deviation: 94.8513 (0.371966)
      kurtosis: 1.22759
      skewness: -1.79655
So my guess is that your tga image is corrupt or written incorrectly.
ohai
Posts: 21
Joined: 2010-05-17T12:33:12-07:00
Authentication code: 8675308

Re: How to preserve IPTC/XMP metadata when compositing?

Post by ohai »

Interesting.. CS5.1, Thumbsplus, and xnView are all able to open it..

Regardless, I created a checkerboard TGA in IM and used it in place of my original one on a set of 3 test images. On converting and reading out the tags in exif tool, there is no more bad tag error. I'll try it on an entire folder of images tonight and see what happens.

Thanks for the guidance and assistance on this. I'm glad it was just what appears to be a bad TGA, but still odd that it opens just fine in every app I use. Oh well.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to preserve IPTC/XMP metadata when compositing?

Post by fmw42 »

Perhaps the other apps are more forgiving of malformed files or perhaps IM is missing something that has changed or more complex in the format?
Post Reply