Skip to content
Advertisement

TIFF file has weird meta information specifically in image size

I have some tiff image files which have multiple pages in one tiff file.

I tried to make separated image files by reading image meta information with libtiff and some python libraries, but the image size seems weird.

Below is the description of a page by using tiffinfo.

TIFF Directory at offset 0x67ca (26570)
  Image Width: 1728 Image Length: 1131
  Resolution: 204, 98 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-white
  FillOrder: lsb-to-msb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 1131
  Planar Configuration: single image plane
  Page Number: 0-8
  ImageDescription: 0512464945

But actually, if I see this image with image viewer(for me, I use just default Windows Image viewer program) has a longer height than width.

enter image description here

Whenever I changed this image as a separated TIFF image, it just looks the same as an original TIF file.

But when I changed this image as PNG, it shrank and looks like the size is changed.

enter image description here

This problem happens regardless of the compression method like LZW or CCITT or python library such as OpenCV, pillow, tiffimage, etc.

Why this is so different? and how can I adjust this image size when converting PNG format?

Sorry for the bad sample images due to the personal information in the image

Advertisement

Answer

Resolution: 204, 98 pixels/inch

that is the piece of information you need to incorporate.

Image Width: 1728 Image Length: 1131

>>> 1728 / 204, 1131 / 98
(8.47, 11.54) # inches
Advertisement