Merge pull request #1680 from pierotofy/msfix

Fix thermal RGB exports
pull/1675/head v2.8.3
Piero Toffanin 2025-05-19 13:55:48 -04:00 zatwierdzone przez GitHub
commit 323d13e669
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -150,6 +150,11 @@ def export_raster(input, output, **opts):
ci.index(ColorInterp.green) + 1,
ci.index(ColorInterp.blue) + 1,
ci.index(ColorInterp.alpha) + 1)
# Only 2 bands (common with thermal)?
elif len(ci) == 2 and ColorInterp.gray in ci and ColorInterp.alpha in ci:
indexes = (ci.index(ColorInterp.gray) + 1,) * 3 + \
(ci.index(ColorInterp.alpha) + 1, )
if ColorInterp.alpha in ci:
mask = reader.read(ci.index(ColorInterp.alpha) + 1, window=win)