summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiogo Ferreira <plx@troublemaker.(none)>2007-06-29 03:09:23 +0100
committerDiogo Ferreira <plx@troublemaker.(none)>2007-06-29 03:09:23 +0100
commit0f0394e8ff76383bbe39ccd37dad4d50c066d1f8 (patch)
treef6a493c05430ef37375a540521c6d774c433e200
parent31f67d3972a04865950b1676f532629769405a1e (diff)
downloadmagick-0f0394e8ff76383bbe39ccd37dad4d50c066d1f8.tar.gz
magick-0f0394e8ff76383bbe39ccd37dad4d50c066d1f8.tar.bz2
Fixed color order for image writing, should be flawless now.
-rw-r--r--magick.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/magick.c b/magick.c
index 0950a10..444dd02 100644
--- a/magick.c
+++ b/magick.c
@@ -138,7 +138,9 @@ static Bool magickImageToFile (
result = MagickNewImage (wand, width, height, NewPixelWand ());
if (result != MagickFalse)
{
- MagickSetImagePixels(wand, 0,0, width, height, "BGRA", CharPixel, data);
+ MagickSetImagePixels(wand, 0,0, width, height, "RGBA", CharPixel, data);
+ /*FIXME: compiz passes the pixels in a different order than imagemagick is expecting, so flipping solves the problem*/
+ MagickFlipImage (wand);
result = MagickWriteImage (wand, file);
if (result != MagickFalse)
{