Magick++ composite problem

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
tom1410
Posts: 1
Joined: 2012-10-09T03:25:45-07:00
Authentication code: 67789

Magick++ composite problem

Post by tom1410 » 2012-10-09T03:42:31-07:00

Hello! I'm new to Magick++ and have one problem with composite(). Code:

Code: Select all

Image fullImg(full);
width = fullImg.size().width();
height = fullImg.size().height();

Image resultImg = Image(Geometry(width, height), Color(MaxRGB, MaxRGB, MaxRGB, 0));
resultImg.colorSpace(CMYKColorspace);

resultImg.composite(workImg, x, y, InCompositeOp);
resultImg.composite(fullImg, 0, 0, OverCompositeOp);

resultImg.write(path+"result.tif");
I have this picture, as "fullImg" (it is transparent in the middle)
[img]
http://postimage.org/image/qj8nbc1l5/0233f65c/
[/img]

As "workImg":
[img]
http://postimage.org/image/q63kgwy5j/3e7805a4/
[/img]

And I would like to get "resultImg" like this:
[img]
http://postimage.org/image/ohwu6gl3h/08787fe9/
[/img]

But I get this (with white instead of transparent)
[img]
http://postimage.org/image/42g9zr9xl/7305f0d8/
[/img]

Maybe someone could help me out with this?

Post Reply