Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nathan/Eilisha Shiraini
colorcode
Commits
03d40802
Commit
03d40802
authored
Sep 20, 2018
by
Nathan/Eilisha Shiraini
Browse files
Corrected a bug causing crashes when interpolating multiple images
parent
25818a57
Changes
1
Hide whitespace changes
Inline
Side-by-side
colorcode/imgen/draw.py
View file @
03d40802
...
...
@@ -13,7 +13,7 @@ class ImGenerator(object):
self
.
interpolation
=
interpolation
.
value
self
.
data
=
data
self
.
quietZone
=
quietZone
self
.
qzColor
=
_sumtuple
(
i
[
0
]
for
i
in
self
.
interpolation
)
self
.
qzColor
=
_sumtuple
(
*
(
i
[
0
]
for
i
in
self
.
interpolation
)
)
self
.
dataSize
=
data
[
0
].
shape
[
0
]
self
.
modSize
=
modSize
self
.
imageSize
=
(
modSize
*
(
quietZone
*
2
+
self
.
dataSize
),)
*
2
...
...
@@ -24,7 +24,7 @@ class ImGenerator(object):
return
self
.
qzColor
if
modY
not
in
range
(
self
.
quietZone
,
self
.
quietZone
+
self
.
dataSize
):
return
self
.
qzColor
return
_sumtuple
(
self
.
interpolation
[
i
][
1
if
data
[
modY
-
self
.
quietZone
,
modX
-
self
.
quietZone
]
else
0
]
for
i
,
data
in
enumerate
(
self
.
data
))
return
_sumtuple
(
*
(
self
.
interpolation
[
i
][
1
if
data
[
modY
-
self
.
quietZone
,
modX
-
self
.
quietZone
]
else
0
]
for
i
,
data
in
enumerate
(
self
.
data
))
)
def
moduleCoordinates
(
self
,
modX
,
modY
):
for
i
in
range
(
self
.
modSize
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment