How do I validate how many images are inside a TIFF file?

1

I want to do a validation in C # when converting a TIFF image to JPEG I can see if all the images have been converted, since TIFF is a single file that sometimes brings several images inside it.

So sometimes I have 10 TIFF that generates 30 JPEG, so in order not to open TIFF and go counting I would like to know if there is a way to know how many images come in TIFF without opening.

    
asked by anonymous 25.01.2017 / 14:46

1 answer

2

Using the GetFrameCount method of class Image you can know the number of images contained in the file:

int numeroImagens = Image.FromFile(@"C:\test.tiff").GetFrameCount(FrameDimension.Page);
    
01.06.2017 / 08:08