1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

Add unit-tests for colorspace.js

Added unit-tests for DeviceGray, DeviceRGB and DeviceCMYK

Added unit-tests for CalGray

Added unit-tests for CalRGB

Removed redundant code

Added unit-tests for LabCS

Added unit-tests for IndexedCS

Update comment

Change lookup to Uint8Array as mentioned in pdf specs(these tests will pass after PR #8666 is merged).

Added unit-tests for AlternateCS

Resolved code-style issues

Fixed code-style issues

Addressed issues pointed out in https://github.com/mozilla/pdf.js/pull/8611#pullrequestreview-52865469
This commit is contained in:
Apoorv Mishra 2017-07-05 16:56:19 +05:30
parent 343b4dc2b6
commit a129de7bd1
4 changed files with 549 additions and 5 deletions

View file

@ -1111,11 +1111,7 @@ var CalRGBCS = (function CalRGBCSClosure() {
}
CalRGBCS.prototype = {
getRgb: function CalRGBCS_getRgb(src, srcOffset) {
var rgb = new Uint8Array(3);
this.getRgbItem(src, srcOffset, rgb, 0);
return rgb;
},
getRgb: ColorSpace.prototype.getRgb,
getRgbItem: function CalRGBCS_getRgbItem(src, srcOffset,
dest, destOffset) {
convertToRgb(this, src, srcOffset, dest, destOffset, 1);