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

Bug: InvalidOperationException in JpegDecoder with SVS (Tiff) images #15

Open
martinweihrauch opened this issue Sep 18, 2024 · 0 comments

Comments

@martinweihrauch
Copy link

When using "SVS" images from Leica Aperio, which have stripped JPEGs in the Tiff (SVS = Tiff) with e. g. 16 strips, then the application throws an error, when decoding the JPEGs.

I followed the code, which you have on your Tiff-Library page to Decode an image. When I do this with SVS images, I get an error in JpegDecoder.cs, line 127 (function: AddHeaderPropsToMarkerList).

This is consistent with all SVS files (so it is not a file problem).

You can download SVS images here:
https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/

I recommend the smallest image (CMU-1.svs).

The call stack is pasted below.

System.InvalidOperationException
HResult=0x80131509
Message=No marker found.
Source=JpegLibrary
StackTrace:
at JpegLibrary.JpegDecoder.AddHeaderPropsToMarkerList(Int64 dataOffset, Int32 dataLength) in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\JpegLibrary\JpegDecoder.cs:line 127
at JpegLibrary.JpegDecoder.ProcessDefineQuantizationTable(JpegReader& reader, Boolean loadQuantizationTables) in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\JpegLibrary\JpegDecoder.cs:line 787
at JpegLibrary.JpegDecoder.LoadTables(ReadOnlySequence1 content) in D:\___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\JpegLibrary\JpegDecoder.cs:line 396 at JpegLibrary.JpegDecoder.LoadTables(Memory1 content) in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\JpegLibrary\JpegDecoder.cs:line 358
at TiffLibrary.Compression.JpegDecompressionAlgorithm.LoadJpegDecoder() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\Compression\JpegDecompressionAlgorithm.cs:line 33
at TiffLibrary.Compression.JpegDecompressionAlgorithm..ctor(Byte[] jpegTables, Int32 numberOfComponents) in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\Compression\JpegDecompressionAlgorithm.cs:line 24
at TiffLibrary.ImageDecoder.TiffDefaultImageDecoderFactory.<g__ResolveJpegDecompressionAlgorithmAsync|11_3>d.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\ImageDecoder\TiffDefaultImageDecoderFactory.cs:line 878
at System.Threading.Tasks.ValueTask`1.get_Result()
at TiffLibrary.ImageDecoder.TiffDefaultImageDecoderFactory.d__2.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\ImageDecoder\TiffDefaultImageDecoderFactory.cs:line 151
at TiffLibrary.ImageDecoder.TiffDefaultImageDecoderFactory.d__1.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\ImageDecoder\TiffDefaultImageDecoderFactory.cs:line 52
at TiffLibrary.ImageDecoder.TiffDefaultImageDecoderFactory.d__1.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\ImageDecoder\TiffDefaultImageDecoderFactory.cs:line 58
at TiffLibrary.TiffFileReader.d__50.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\TiffFileReader.cs:line 694
at TiffLibrary.TiffFileReader.d__50.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\thirdparty\TiffLibrary\TiffFileReader.cs:line 699
at WholeSlideAnonymizer.Tests.WholeSlideAnonymizerTests.d__4.MoveNext() in D:___PROGRAMMING_SOURCETREE\WsiAnonymizer3\tests\WholeSlideAnonymizer.Tests\WholeSlideAnonymizerTest.cs:line 86

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

1 participant