Repository navigation
Image.Load throws IndexOutOfRangeException (Tiff) #2435
Description
Activity
Thanks for the images. Will have a look asap.
Reacted by João Victor Neves Monteiro SoaresBoth images have none standard tile width according to
tiffinfo$ tiffinfo 22212589.tiff 22212589.tiff: Warning, Nonstandard tile width 2481, convert file. 22212589.tiff: Warning, Nonstandard tile length 3542, convert file. === TIFF directory 0 === TIFF Directory at offset 0x8 (8) Image Width: 2481 Image Length: 3542 Tile Width: 2481 Tile Length: 3542 Resolution: 300, 300 pixels/inch Bits/Sample: 1 Compression Scheme: CCITT Group 4 Photometric Interpretation: min-is-black FillOrder: msb-to-lsb Samples/Pixel: 1 Planar Configuration: single image plane Group 4 Options: (0 = 0x0)$ tiffinfo 22217160.tiff 22217160.tiff: Warning, Nonstandard tile width 2481, convert file. 22217160.tiff: Warning, Nonstandard tile length 3542, convert file. === TIFF directory 0 === TIFF Directory at offset 0x8 (8) Image Width: 2481 Image Length: 3542 Tile Width: 2481 Tile Length: 3542 Resolution: 300, 300 pixels/inch Bits/Sample: 1 Compression Scheme: CCITT Group 4 Photometric Interpretation: min-is-black FillOrder: msb-to-lsb Samples/Pixel: 1 Planar Configuration: single image plane Group 4 Options: (0 = 0x0)Both images have none standard tile width
I don't really know what it means. Those images are invalid?
I mean, both could be opened by other softwares.
What I need to do?BTW: thanks for the answer.
I still try to figure this out. My comment was more addressed towards @JimBobSquarePants who also wanted to figure this out (sorry for not being explicit here). I thought this may help debugging the issue. If other software/viewers can open it, we should also try to be able to decode it.
Reacted by João Victor Neves Monteiro SoaresReacted by João Victor Neves Monteiro SoaresI think that I found the issue.
@joaovsoares would it be ok for you, if I use the provided test images in a unit test?
I was able to create a similar test image.PR for the fix is open.
Reacted by João Victor Neves Monteiro Soares- added 2 commits that reference this issue
on Apr 13, 2023 I think that I found the issue.
@joaovsoares would it be ok for you, if I use the provided test images in a unit test?I was able to create a similar test image.PR for the fix is open.
@brianpopow sure!
Sorry for the delayed answer.
Prerequisites
DEBUGandRELEASEmodeImageSharp version
3.0.1
Other ImageSharp packages and versions
No
Environment (Operating system, version and so on)
Linux
.NET Framework version
NET 6
Description
When loading some Tiffs, we received this exception.
I found a similar closed issue, but it seemed different to me.
The closed issue related a encode problem. Here it's a decode problem.
Steps to Reproduce
Load the provided images from a stream.
The error throws at
Image.Loadcommand.Images
Lote.zip