Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char * colorType = getStringValue(env, funcParams[2], SPACELen);
- // m is either the value srgb | adobeRgb
- Matrix m = getEnumFromStr(colorType);
- Rgb * rgb = getRGBFromJSObj(env, funcParams[0]);
- xyz = generateXyzFromRgb(rgb, m);
- const rgb = {
- r: 255,
- g: 255,
- b: 255
- };
- const xyz = lib.getXyzFromRgb(rgb, "srgb", 10000);
- expect(xyz).to.be.deep.equal({
- x: 0.9504,
- y: 1,
- z: 1.0888
- });
- {
- x: 0.9504,
- y: 1,
- z: 1.0888
- }
- {
- x: 0.9502,
- y: 0.9997,
- z: 1.0886
- }
- // RGB and & m variable is outputing the same value as the conversion done by the C code above
- xyz = generateXyzFromRgb(rgb, m);
Add Comment
Please, Sign In to add comment