ExifTool Forum

ExifTool => Newbies => Topic started by: Rose on February 20, 2018, 04:30:44 AM

Title: Getting metadata from Tiff file
Post by: Rose on February 20, 2018, 04:30:44 AM
Hello all. I'm doing a project analysing micro-CT images and the reconstruction program uses tiff metadata to reconstruct the sample. After some editing of the images in ImageJ I lost the metadata.
Would anyone know how to copy the metadata? I think its a binary in the image that it uses.

Thank you for all the help.

This the metadata I need:

File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
Subfile Type                    : Full-resolution Image
Image Width                     : 1024
Image Height                    : 1024
Bits Per Sample                 : 16
Compression                     : Uncompressed
Photometric Interpretation      : BlackIsZero
Strip Offsets                   : (Binary data 316 bytes, use -b option to extract)
Samples Per Pixel               : 1
Rows Per Strip                  : 24
Strip Byte Counts               : (Binary data 257 bytes, use -b option to extract)
X Resolution                    : 1733
Y Resolution                    : 1733
Resolution Unit                 : inches
Image Size                      : 1024x1024
Megapixels                      : 1.0

Metadata of the edited image:

File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Big-endian (Motorola, MM)
Subfile Type                    : Full-resolution Image
Image Width                     : 1024
Image Height                    : 1024
Bits Per Sample                 : 16
Photometric Interpretation      : BlackIsZero
Image Description               : ImageJ=1.51h.min=0.0.max=65535.0.
Strip Offsets                   : 3584
Samples Per Pixel               : 1
Rows Per Strip                  : 1024
Strip Byte Counts               : 2097152
X Resolution                    : 1733
Y Resolution                    : 1733
Resolution Unit                 : inches
XMP Toolkit                     : Image::ExifTool 10.79
Image Size                      : 1024x1024
Megapixels                      : 1.0
Title: Re: Getting metadata from Tiff file
Post by: Phil Harvey on February 20, 2018, 08:18:54 AM
All of those tags (except the resolution tags) are characteristics of the way the image is stored.   You can't just change them without changing the way the image is stored.

- Phil
Title: Re: Getting metadata from Tiff file
Post by: Rose on February 20, 2018, 08:44:18 AM
Would it be possible to copy the Strip Offset binary data and Strip byte counts binary to other images?
The software that reconstruct the images uses that data, but when I fixed the brightness values of the original images it lost that data.
Sorry I'm not really that good with terminal.
Title: Re: Getting metadata from Tiff file
Post by: Phil Harvey on February 20, 2018, 08:48:58 AM
The StripOffsets and StripByteCounts reference the strips by which the main image is stored.  Copying them to another file doesn't make any sense.

- Phil
Title: Re: Getting metadata from Tiff file
Post by: Rose on February 20, 2018, 12:00:31 PM
My apologies. It seems that the issue is a tag in the tiff file introduced by imageJ. I should be able to just remove this tag