mozilla/pdf.js — pull request #4565 by fkaelberer (2014-04-05 16:54:09+00:00)
Title: Read color info from JPX stream + fix color problem #4540

These are two commits that I accicently squashed into one.

The first one gets color information directly from the JPX stream, to define the color space in `images.js`.
This fixes #1303, #4407 (and all documents that are created with Acrobat 8 from JPX images).
I'm not 100% if this is how it is supposed to be done in `image.js`, so please have a look at that.

The other commit corrects the coefficient magnitudes in `jpx.js` and so fixes #4540.

Everything below Line 1000 in `jpx.js` is just minor cleanup.

I opened another PR concurrently to #4538, because I wanted to fix errors first, and make the performance oriented changes of #4538 optional.