1

I am writing a javascript decoder for DICOM images and notice that safari supports native decode of JPEG2000 which some DICOMs contain.

I can get this to work, but can't find a resource on how to detect the feature other than:

  1. Detect the browser type Detect Safari browser. All of which seem either rather hacky or in the case of window.safari !== undefined - doesn't work for iOS.

  2. Try and detect failure, but this kinda defeats the object of trying to decode be as fast as possible!

So, is there a general way of detecting which codecs a browser supports?

Nick Hingston
  • 8,724
  • 3
  • 50
  • 59
  • not that I know of... https://caniuse.com/jpeg2000 – malat Feb 11 '21 at 15:39
  • @malat This is not a Dicom issue. It is only relevant in the sense that Dicom files may contain files in other formats. Which means that OP cannot rely on the browser to automatically detect that it is JPEG2000. – S.L. Barth is on codidact.com Feb 11 '21 at 16:33
  • I have removed the DICOM tag, it is certainly not DICOM specific - or even JPEG2000 for that matter. Would be good to be able to detect any codec availability. – Nick Hingston Feb 11 '21 at 18:58

0 Answers0