- // monochrome one is not, then define it.
- if (table[i].c_color && !table[i].m_color)
- table[i].m_color = mapcolor(table[i].c_color, false);
+ // grayscale or monochrome ones are not, then define them.
+ mapcolor(entry.c_color, &entry.g_color, &entry.m_color);
+ }
+
+ if (!buggy_color.empty()) {
+ lyxerr << "The XPM file contains silly colors, "
+ << "an example being \""
+ << buggy_color << "\".\n"
+ << "This was cropped to \""
+ << buggy_color.substr(0, 7)
+ << "\" so you can see something!\n"
+ << "If this file was created by ImageMagick's convert,\n"
+ << "then upgrading may cure the problem."
+ << std::endl;