Commit 8e6a54fb authored by Nathan/Eilisha Shiraini's avatar Nathan/Eilisha Shiraini
Browse files

Created the interpolation patterns

parent dbc98e79
from enum import Enum
class BWInterpolate(Enum):
SINGLE = [
(0xFF, 0x00),
]
class GrayInterpolate(Enum):
SINGLE = [
(0xFF, 0x00),
]
GRAY = [
(0xF0, 0x00),
(0x0F, 0x00),
]
FULL = [
(0x80, 0x00),
(0x40, 0x00),
(0x20, 0x00),
(0x10, 0x00),
(0x08, 0x00),
(0x04, 0x00),
(0x02, 0x00),
(0x01, 0x00),
]
class RGBInterpolate(Enum):
SINGLE = [
((0xFF, 0xFF, 0xFF), (0x00, 0x00, 0x00)),
]
RC = [
((0xFF, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0xFF, 0xFF), (0x00, 0x00, 0x00)),
]
GM = [
((0x00, 0xFF, 0x00), (0x00, 0x00, 0x00)),
((0xFF, 0x00, 0xFF), (0x00, 0x00, 0x00)),
]
BY = [
((0x00, 0x00, 0xFF), (0x00, 0x00, 0x00)),
((0xFF, 0xFF, 0x00), (0x00, 0x00, 0x00)),
]
TRICHANNEL = [
((0xFF, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0xFF, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0xFF), (0x00, 0x00, 0x00)),
]
HALFCHANNEL = [
((0xF0, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x0F, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0xF0, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x0F, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0xF0), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x0F), (0x00, 0x00, 0x00)),
]
FULL = [
((0x80, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x40, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x20, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x10, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x08, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x04, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x02, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x01, 0x00, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x80, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x40, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x20, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x10, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x08, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x04, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x02, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x01, 0x00), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x80), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x40), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x20), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x10), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x08), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x04), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x02), (0x00, 0x00, 0x00)),
((0x00, 0x00, 0x01), (0x00, 0x00, 0x00)),
]
INTERPOLATION_CLASSES = {
'1' : BWInterpolate,
'L' : GrayInterpolate,
'RGB' : RGBInterpolate,
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment