Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed display tiff file #53

Closed
ptk042 opened this issue Jan 7, 2016 · 6 comments
Closed

failed display tiff file #53

ptk042 opened this issue Jan 7, 2016 · 6 comments
Assignees

Comments

@ptk042
Copy link

ptk042 commented Jan 7, 2016

hi,
i have a problem with one tiff file.
this is a tiffinfo log:

TIFF Directory at offset 0x297c4 (169924)
  Image Width: 4096 Image Length: 3364
  Tile Width: 256 Tile Length: 256
  Resolution: 300, 300 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 16
  Planar Configuration: single image plane
  Page Number: 0-7
TIFF Directory at offset 0x37866 (227430)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 2048 Image Length: 1682
  Tile Width: 256 Tile Length: 256
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 32
  Planar Configuration: single image plane
  Page Number: 1-7
TIFF Directory at offset 0x3b6d0 (243408)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 1024 Image Length: 841
  Tile Width: 256 Tile Length: 256
  Resolution: 75, 75 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 64
  Planar Configuration: single image plane
  Page Number: 2-7
TIFF Directory at offset 0x3c328 (246568)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 512 Image Length: 420
  Tile Width: 256 Tile Length: 256
  Resolution: 37.5, 37.5 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 128
  Planar Configuration: single image plane
  Page Number: 3-7
TIFF Directory at offset 0x3c574 (247156)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 256 Image Length: 210
  Tile Width: 256 Tile Length: 256
  Resolution: 18.75, 18.75 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 256
  Planar Configuration: single image plane
  Page Number: 4-7
TIFF Directory at offset 0x3c7b0 (247728)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 128 Image Length: 105
  Tile Width: 256 Tile Length: 256
  Resolution: 9.375, 9.375 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 512
  Planar Configuration: single image plane
  Page Number: 5-7
TIFF Directory at offset 0x3c9f2 (248306)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 64 Image Length: 52
  Tile Width: 256 Tile Length: 256
  Resolution: 4.6875, 4.6875 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 1024
  Planar Configuration: single image plane
  Page Number: 6-7

If I open the file with the file display appears correctly, but if you use iipsrv the file is not displayed correctly, but are displayed pieces of other images.

this is the relative path for image /fcgi-bin/iipsrv.fcgi?iiif=/DU/2015/1/tif/13f8633e-05e2-4c5a-b62a-22e66f8d8c61.tif/info.json

@ruven
Copy link
Owner

ruven commented Jan 7, 2016

The tiffinfo output looks fine. Could you send me the image to test out?

@ruven ruven self-assigned this Jan 7, 2016
@ptk042
Copy link
Author

ptk042 commented Jan 8, 2016

i send email to xxx@xxxx.xxx, its correct?

@ruven
Copy link
Owner

ruven commented Jan 8, 2016

Thanks, I got it. The problem is that your image is a 1 bit per pixel bilevel image. At the moment, this works for IIPImage for JPEG2000, but not yet for TIFF.

@ruven
Copy link
Owner

ruven commented Feb 29, 2016

I've just updated iipsrv to handle 1 bit bilevel TIFFs. It should now work for your images.

@ruven ruven closed this as completed Feb 29, 2016
@joesong168
Copy link

May I know does that mean I could use bilevel TIFF as source image, instead of converting it to pyramid tiff first?

@ruven
Copy link
Owner

ruven commented Oct 18, 2023

May I know does that mean I could use bilevel TIFF as source image, instead of converting it to pyramid tiff first?

Yes, you can use bilevel TIFF images, but they still need to be converted to pyramid TIFF. If you use vips to convert, they will still be bilevel after conversion:

vips tiffsave input.tif output.tif --pyramid --tile --tile-width 256 --tile-height 256 --compression none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants