I want to rotate an image using Magick++ and I want the
background color (for the parts that are filled in by the rotation)
to have some alpha value.

I wrote the following program but it only fill in the new areas using the
color without the alpha value. When I do a similar program using the wand
api I get the result that I want. What did I do wrong in my Magick++
program?

/Dennis

// g++ `Magick++-config  --cppflags --cxxflags --ldflags --libs` test.cc
#include <Magick++.h>

using namespace Magick;

int
main (int argc,
      char **argv)
{
  Image im;
  Color c (0xffff, 0, 0xffff, 0x8888);

  im.read ("cat.jpg");  // change to some image you have
  im.matte(true);
  im.backgroundColor (c);
  im.rotate(20);
  im.write ("out.png");

  return 0;
}


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to