Unknown compression
Opened this issue · 6 comments
Hi good day.
Im having an issue with Error: Unknown compression method identifier: 33005 when using this image Aperio CMU-1-JP2K-33005 (https://openslide.org/demo/#).. the viewer seems like not fully loaded
can guide me how?
Hmm... I downloaded that slide, and using the demo page it seems to be working fine:
It also looks like some of the file was extracted correctly in your viewer because some tiles are rendered. So, I'm not sure what's going on. What browser and operating system are you using? What version of OpenSeadragon? Have you modified anything about the plugin or the file itself?
@pearcetm thankyou for the reply.. I finally manage to found the issue.. Is it because i set the minPixelRatio = 0.1 on the openseadragon. I try using your demo code and set the minPixelRatio also gives me the error
I think i will just remove the minPixelRatio on my code first. Thank you :)
I am getting this error now too. Did you find a fix?
I'm not sure why this would be happening or how it is related to the minPixelRatio
parameter. If anyone could shed light on this it would be great!
This issue is not directly related to the minPixelRatio
parameter, although I can see why it would seem that way 😅. What's actually causing the errors is that the higher resolution images in the pyramid are compressed using the JPEG-2000 format, instead of the vanilla JPEG that geotiff.js is able to automatically decode. Hence the "Unknown compression method" error. You need to add a JPEG-2000 decoder to geotiff.js when creating the worker pool to render the higher level tiles.
Note that the thumbnail image that you see on first render is typically a simple JPEG, so GeoTIFFTileSource decodes that and shows it to you, no problem. When you set a lower value for minPixelRatio
, OSD wants to load in higher level tiles sooner. That's why you see the compression error pop up on first load itself. You should see the same problem if you try zooming into the image @pearcetm .
I created a fork of GeoTIFFTileSource a while back to resolve this issue, but in the meantime I saw that the source repo was changing rapidly, so I never got around to raising a PR for it. Here's the demo page with the modified GeoTIFFTileSource to showcase JPEG-2000 decoding: https://episphere.github.io/GeoTIFFTileSource-JPEG2k/demo/demo.html .
Merging this back to GeoTIFFTileSource is definitely on my to-do list as I'm sure there's interest from the pathology community for JPEG-2000 support. If anyone has the bandwidth to take it on, go for it! Happy to answer any queries on here as well!