#2 can not generate watermark picture

v1.0_(example)
closed
None
5
2014-01-06
2005-05-20
Anonymous
No

#include <Magick++.h>
using namespace Magick;

int main()
{
// Create watermark.
Image img1;
img1.read("smile.gif");

// Hide watermark in image.
Image img2;
img2.read("model.gif");
img2.texture(img1);
img2.write("model.png");

return 0;
}

i want to add a water mark (smile.gif) to model.gif, but the
generate picture model.png just the same as model.gif,
nothing change, why? thank you:-)

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2014-01-06
    • status: open --> closed
    • assigned_to: Bob Friesenhahn
    • Group: --> v1.0_(example)
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-01-06

    Texture applies a texture on the image "background", which means that if the image had transparent parts, the texture would show through. If your model.gif was opaque, then the texture would not show.

    You probably want to use composition to compose your watermark on the image. At very low levels, the composition may not be obvious.

    Regardless, this posting is exceedingly old so I am closing it now.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks