diff --git a/nebula_decoders/include/nebula_decoders/nebula_decoders_common/point_filters/downsample_mask.hpp b/nebula_decoders/include/nebula_decoders/nebula_decoders_common/point_filters/downsample_mask.hpp index f14420af..bc6ed40a 100644 --- a/nebula_decoders/include/nebula_decoders/nebula_decoders_common/point_filters/downsample_mask.hpp +++ b/nebula_decoders/include/nebula_decoders/nebula_decoders_common/point_filters/downsample_mask.hpp @@ -109,7 +109,8 @@ class DownsampleMaskFilter if (export_dithered_mask) { std::filesystem::path out_path{filename}; - out_path = out_path.replace_extension("_dithered.png"); + out_path = out_path.replace_filename( + out_path.stem().string() + "_dithered" + out_path.extension().string()); try { dithered.write(out_path);