Avoid creating an int64 array

This commit is contained in:
Steven Silvester
2015-01-30 21:01:45 -06:00
parent 2c635989d2
commit 0859b3662e
+1 -1
View File
@@ -281,8 +281,8 @@ class Picture(object):
if isinstance(color, six.string_types):
color = color_dict[color]
rgb_size = tuple(size) + (len(color),)
color = np.array(color, dtype=np.uint8)
array = np.ones(rgb_size, dtype=np.uint8) * color
array = array.astype(np.uint8)
# Force RGBA internally (use max alpha)
if array.shape[-1] == 3: