How to extract Tiff image from IFD2 to a new file

Started by c++, November 08, 2013, 11:25:44 AM

Previous topic - Next topic

c++

Hi,

I have a Tiff image that contains multiple IFDs with multiple images.

  + [IFD0 directory with 20 entries]
  | 0)  ImageWidth = 6919
  | 1)  ImageHeight = 4558
  | 2)  BitsPerSample = 16 16 16

and

  + [IFD2 directory with 15 entries]
  | 1)  ImageWidth = 6919
  | 2)  ImageHeight = 4558
  | 3)  BitsPerSample = 16

At IFD2 we have a 16 bit Grayscale Tiff image and I'd like to extract that grayscale Tiff to a new Tiff file.
It would really be helpful if you could point me towards how to do that.

Phil Harvey

I think that the TIFF library may include an application to split/join TIFF pages like this.  There may be other utilities out there that will do this too.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

c++

So that does not work with Exiftool itself? I'm asking because I already use Exiftool on the Windows and OS X version of an application and would dislike to have to add another tool to the box for this. I had hoped I could do this with Exiftool...

Phil Harvey

No, sorry.  ExifTool can not currently be used to restructure a TIFF image.  (That's twice recently that I've been asked for this feature.)  I think that the average ExifTool user could easily get into trouble wielding a power like this were it possible.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

c++

Thank you very much for the extremely quick response.

I wouldn't go as far as putting this as asking for the feature. It would have been convenient and I wasn't sure if I missed how to do it. I don't require ImageMagick thus far however ImageMagick can be used to do this like this if anyone stubles across this via Google later on:

Convert a.tif -scene 1 a%d.tif

Phil Harvey

Thanks for posting your convert command.  Would be nice if everyone was this considerate.  I can't tell you how many times I've googled for solutions to a problem where the solution was never posted.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).