Compose 2 PNG images using a mask

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
mynetx

Compose 2 PNG images using a mask

Post by mynetx »

  1. What is the C or PHP equivalent to...?

    Code: Select all

    composite new_image.png into_old.png with_mask.png save_as.png
  2. What can be the cause of...?
    Fatal error: Call to undefined function magicksetimageclipmask() in /on/a/server/some/file.php on line 1
    while the other Magick functions, like NewMagickWand etc, work.
mynetx

Re: Compose 2 PNG images using a mask

Post by mynetx »

*bump*
QooooQ

Re: Compose 2 PNG images using a mask

Post by QooooQ »

I can't use MagickSetImageAlphaChannel either.
This is because the dll I have is representing a MagickWand Version 1.0.5, where this function haven't been introduced yet (when i'm correct?!).
Maybe its the same for magicksetimageclipmask()
mynetx

Re: Compose 2 PNG images using a mask

Post by mynetx »

*bump*
Still no solution in sight? :(
mynetx

Re: Compose 2 PNG images using a mask

Post by mynetx »

Posted: Fri, 17 Oct 2008, 10:40

Nobody there after 3 months? I start worrying if I will solve this problem at all ... :?
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Compose 2 PNG images using a mask

Post by el_supremo »

What is the C or PHP equivalent to...?
See my MagickWand examples in C (url in my sig). The example titled "Using a Compose Mask to Limit the Composed Area" shows you how to replicate the composite command you gave. However, it is not "pure" MagickWand code. I had to resort to using a little bit of MagickCore because I couldn't figure out how to set the ->mask entry in the destination wand using a MagickWand function.
Perhaps Magick can clue me in :-)

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
mynetx

Re: Compose 2 PNG images using a mask

Post by mynetx »

Unfortunately I can't resort to Magick Core in PHP :P
Post Reply