+ for (rgb = 0; rgb <= 0xffffff && rgb_table.count(rgb); ++rgb)
+ ;
+ if (rgb > 0xffffff)
+ {
+ wxLogError(_("XPM: no colors left to use for mask!"));
+ return wxNullImage;
+ }
+
+ wxXPMColourMapData& maskData = clr_tbl[maskKey];
+ maskData.R = wxByte(rgb >> 16);
+ maskData.G = wxByte(rgb >> 8);
+ maskData.B = wxByte(rgb);
+
+ img.SetMaskColour(maskData.R, maskData.G, maskData.B);