It reduces the memory use and the newly added function `getRgbHex` is 4 times faster.
It's a follow-up of https://github.com/mozilla/pdf.js.qcms/pull/1.