diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-11-01 12:10:24 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-11-01 12:10:24 +0100 |
commit | 5fd6625a09421c86f7bf27efaff9a64cc5cf3d0f (patch) | |
tree | 32c7f9643a7edc077bbce72414afc7ab52e61ac7 /tex/context/base/mkiv/colo-icc.lua | |
parent | 7fc4b935d045c84e89459e726ff54ae331e4c574 (diff) | |
download | context-5fd6625a09421c86f7bf27efaff9a64cc5cf3d0f.tar.gz |
2017-11-01 12:01:00
Diffstat (limited to 'tex/context/base/mkiv/colo-icc.lua')
-rw-r--r-- | tex/context/base/mkiv/colo-icc.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/colo-icc.lua b/tex/context/base/mkiv/colo-icc.lua index 638c6c4c4..54072fefa 100644 --- a/tex/context/base/mkiv/colo-icc.lua +++ b/tex/context/base/mkiv/colo-icc.lua @@ -8,6 +8,7 @@ if not modules then modules = { } end modules ['colo-icc'] = { local char, byte, gsub, match, format, strip = string.char, string.byte, string.gsub, string.match, string.format, string.strip local readstring, readnumber = io.readstring, io.readnumber +local band = bit32.band local colors = attributes and attributes.colors or { } -- when used in mtxrun @@ -78,10 +79,10 @@ function colors.iccprofile(filename,verbose) o == 1 and "dependent" or "unknown" local d = header.deviceattributes header.deviceattributes = { - [number.hasbit(d,1) and "transparency" or "reflective"] = true, - [number.hasbit(d,2) and "mate" or "glossy" ] = true, - [number.hasbit(d,3) and "negative" or "positive" ] = true, - [number.hasbit(d,4) and "bw" or "color" ] = true, + [band(d,1) ~= 0 and "transparency" or "reflective"] = true, + [band(d,2) ~= 0 and "mate" or "glossy" ] = true, + [band(d,3) ~= 0 and "negative" or "positive" ] = true, + [band(d,4) ~= 0 and "bw" or "color" ] = true, } local r = header.renderingintent header.renderingintent = |