Keeping proprietary tags in tiff file

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?".
Post Reply
arnoques
Posts: 3
Joined: 2012-10-03T11:44:08-07:00
Authentication code: 67789

Keeping proprietary tags in tiff file

Post by arnoques »

Hi, everyone!
I'm trying to compress many tiff images to save some space. I'm using

Code: Select all

convert input.tif -compress Zip output.tif
Like many others before, I get the "unknown field with tag 34118 (0x8546) encountered. `TIFFReadDirectory' @ warning". I guess you must be tired of questions about it, but I promise this one is different. ;-)

My problem is that convert strips the proprietary tag, but I need to keep them because they have information about the parameters used in the microscope when taking the image. Is there any way to do that?

Thanks!

Some data of these images:

Code: Select all

tiffinfo input.tif
TIFF Directory at offset 0x8 (8)
  Subfile Type: (0 = 0x0)
  Image Width: 1024 Image Length: 768
  Resolution: 1, 1 (unitless)
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: palette color (RGB from colormap)
  Samples/Pixel: 1
  Rows/Strip: (infinite)
  Planar Configuration: single image plane
  Color Map: (present)
  Tag 34118: 0
0
0
1.464848e-00
...and many more lines

Code: Select all

tiffinfo output.tif
TIFF Directory at offset 0x9784c (620620)
  Image Width: 1024 Image Length: 768
  Resolution: 1, 1 (unitless)
  Bits/Sample: 8
  Compression Scheme: AdobeDeflate
  Photometric Interpretation: palette color (RGB from colormap)
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 768
  Planar Configuration: single image plane
  Page Number: 0-1
  Color Map: (present)
  DocumentName: Q32_cm4989.tif.tmp
  White Point: 0.3127-0.329
  PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Keeping proprietary tags in tiff file

Post by anthony »

My understanding is the IM should keep unknown tags, unless striped. At least TIFF to TIFF

I would report this in Bugs.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply