Color allocation fix, made it allocate close colors too.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2380
a592a061-630c-0410-9148-
cb99ea01b6c8
+2001-07-29 Baruch Even <baruch@lyx.org>
+
+ * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
+ colors with closeness of 10000.
+
+ * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
+
2001-07-29 Baruch Even <baruch@lyx.org>
* GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
void
GraphicsCacheItem::imageConverted(bool success)
{
- lyxerr << "imageConverted, status=" << success << endl;
+ // Debug output
+ string text = "succeeded";
+ if (!success)
+ text = "failed";
+ lyxerr << "imageConverted, conversion " << text << "." << endl;
if (! success) {
lyxerr << "(GraphicsCacheItem::imageConverter) "
Pixmap pixmap;
Pixmap mask;
XpmAttributes attrib;
- attrib.valuemask = 0;
+
+ attrib.valuemask = XpmCloseness | XpmAllocColor;
+ attrib.closeness = 10000;
int status = XpmReadFileToPixmap(
display,
if (status != XpmSuccess) {
lyxerr << "Error reading XPM file '"
- << XpmGetErrorString(status)
+ << XpmGetErrorString(status) << "'"
<< endl;
return ErrorWhileLoading;
}