mozilla/pdf.js — pull request #961 by brendandahl (2011-12-19 03:06:52+00:00)
Title: Scaling Soft Masks

Fixes #920 and several corpus report issues.

Scaling turned out to be a little more complicated. Initially I assumed you would just scale smask to the size of the image they are with. However, some images have an smask that is much bigger than the image they are with and all the information(shape) is in the smask. To match poppler and acrobat we have to scale the base image up to the soft mask. This fix scales the soft mask and image to the largest dimension of either so its possible both images will be rescaled.

Other notes:
-Fixes a bug I introduced with the isDefaultDecode stuff in colorspace.js where I forgot to return the value.
-Fixes fillGrayBuffer so the value is mapped to the right range.