convert in later versions uses the "opaque" color name. This patch
just sets it to white. Please apply.

thanks
john

-- 
"here's a joke for you: why did the chicken turn around and around in circles. 
 as i think she turned around; but why? why did the chicken cross the road; 
 i think she turned around but why? why did the chicken turn around and do something 
else?" 
        - Mega HAL
Index: src/graphics/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/ChangeLog,v
retrieving revision 1.56
diff -u -r1.56 ChangeLog
--- src/graphics/ChangeLog      19 Apr 2002 09:17:05 -0000      1.56
+++ src/graphics/ChangeLog      28 Apr 2002 18:31:47 -0000
@@ -1,3 +1,8 @@
+2002-04-28  John Levon  <[EMAIL PROTECTED]>
+
+       * GraphicsImageXPM.C: understand convert's use of "opaque"
+         as a colour name
+
 2002-04-19  Marco Morandini <[EMAIL PROTECTED]>
 
        * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
Index: src/graphics/GraphicsImageXPM.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsImageXPM.C,v
retrieving revision 1.11
diff -u -r1.11 GraphicsImageXPM.C
--- src/graphics/GraphicsImageXPM.C     18 Apr 2002 17:48:55 -0000      1.11
+++ src/graphics/GraphicsImageXPM.C     28 Apr 2002 18:31:47 -0000
@@ -188,13 +188,18 @@
        attrib.valuemask |= XpmColorKey;
 
        // Set the color "none" entry to the color of the background.
-       XpmColorSymbol xpm_col;
-       xpm_col.name = 0;
-       xpm_col.value = "none";
-       xpm_col.pixel = lyxColorHandler->colorPixel(LColor::graphicsbg);
+       XpmColorSymbol xpm_col[2];
+       xpm_col[0].name = 0;
+       xpm_col[0].value = "none";
+       xpm_col[0].pixel = lyxColorHandler->colorPixel(LColor::graphicsbg);
 
-       attrib.numsymbols = 1;
-       attrib.colorsymbols = &xpm_col;
+       // some image magick versions use this
+       xpm_col[1].name = 0;
+       xpm_col[1].value = "opaque";
+       xpm_col[1].pixel = lyxColorHandler->colorPixel(LColor::white);
+
+       attrib.numsymbols = 2;
+       attrib.colorsymbols = xpm_col;
        attrib.valuemask |= XpmColorSymbols;
 
        // Load up the pixmap

Reply via email to