Skip to content

Commit 910b38b

Browse files
committed
minor fixes
1 parent a619956 commit 910b38b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xrspatial/multispectral.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,9 +815,9 @@ def true_color(r, g, b, nodata=1):
815815
h, w = r.shape
816816

817817
data = np.zeros((h, w, 4), dtype=np.uint8)
818-
data[:, :, 0] = (_normalize_data(r)).astype(np.uint8)
819-
data[:, :, 1] = (_normalize_data(g)).astype(np.uint8)
820-
data[:, :, 2] = (_normalize_data(b)).astype(np.uint8)
818+
data[:, :, 0] = (_normalize_data(r.data)).astype(np.uint8)
819+
data[:, :, 1] = (_normalize_data(g.data)).astype(np.uint8)
820+
data[:, :, 2] = (_normalize_data(b.data)).astype(np.uint8)
821821

822822
a = np.where(np.logical_or(np.isnan(r), r <= nodata), 0, 255)
823823
data[:, :, 3] = a.astype(np.uint8)

0 commit comments

Comments
 (0)