diff --git a/src/raster/file/gpl_file.cpp b/src/raster/file/gpl_file.cpp index 1acda707d..298156e91 100644 --- a/src/raster/file/gpl_file.cpp +++ b/src/raster/file/gpl_file.cpp @@ -30,6 +30,7 @@ #include #include #include +#include namespace raster { namespace file { @@ -56,8 +57,13 @@ Palette* load_gpl_file(const char *filename) if (line.empty() || line[0] == '#') continue; + // Remove properties (TODO add these properties in the palette) + if (!std::isdigit(line[0])) + continue; + int r, g, b; std::istringstream lineIn(line); + // TODO add support to read the color name lineIn >> r >> g >> b; if (lineIn.good()) { pal->setEntry(entryCounter, rgba(r, g, b, 255));