summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/colo-icc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/colo-icc.lua')
-rw-r--r--tex/context/base/mkiv/colo-icc.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/colo-icc.lua b/tex/context/base/mkiv/colo-icc.lua
index f7ed561c1..06a913e17 100644
--- a/tex/context/base/mkiv/colo-icc.lua
+++ b/tex/context/base/mkiv/colo-icc.lua
@@ -8,7 +8,8 @@ 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 formatters = string.formatters
+local band = bit32.band
+local next = next
local colors = attributes and attributes.colors or { } -- when used in mtxrun
@@ -79,10 +80,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 =