Fix NaN artifacts in tif_to_crop tile rendering
Replace NaN values with 0 before colormap application so no-data zones render as the darkest color instead of undefined pixels.
This commit is contained in:
@ -160,7 +160,7 @@ class TestTifToCrop:
|
||||
|
||||
rgb = np.asarray(PILImage.open(str(out)).convert('RGB'))
|
||||
hole = rgb[15:25, 15:25, :]
|
||||
assert np.all(hole == 0), "le nodata doit être rendu en noir"
|
||||
assert np.all(hole < 10), "le nodata doit être rendu en noir"
|
||||
|
||||
def test_without_nodata(self, tmp_path):
|
||||
"""Un TIF sans nodata est converti sans crash, taille préservée."""
|
||||
|
||||
Reference in New Issue
Block a user