Skip to content

Commit 323d13e

Browse files
authored
Merge pull request #1680 from pierotofy/msfix
Fix thermal RGB exports
2 parents 4a43d18 + 5b6c412 commit 323d13e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/raster_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ def export_raster(input, output, **opts):
150150
ci.index(ColorInterp.green) + 1,
151151
ci.index(ColorInterp.blue) + 1,
152152
ci.index(ColorInterp.alpha) + 1)
153+
154+
# Only 2 bands (common with thermal)?
155+
elif len(ci) == 2 and ColorInterp.gray in ci and ColorInterp.alpha in ci:
156+
indexes = (ci.index(ColorInterp.gray) + 1,) * 3 + \
157+
(ci.index(ColorInterp.alpha) + 1, )
153158

154159
if ColorInterp.alpha in ci:
155160
mask = reader.read(ci.index(ColorInterp.alpha) + 1, window=win)

0 commit comments

Comments
 (0)