extract code to own method for faster JPX decoding
Merge pull request #3554 from fkaelberer/FasterJPXdecoding

Speed up JPX decoding on Firefox