feuerfalke Posted September 11, 2007 Share Posted September 11, 2007 Hi, I'm trying to use MagickWand to do some seemingly simple tasks that gdlibrary is not powerful enough to do. However the Magickwand documentation is somewhere between sparse and nonexistent, and it is not helpful at all. I don't have the time to spend messing around with every single MagickWand function that looks like it might be useful. There are no good tutorials to using MagickWand online. If anyone is experienced with MagickWand and could point me in the right direction, that would be great. The tasks I want to do are as follows: 1. Overlay one PNG onto another. This would seem simple enough - but MagickWand seems to insist on using some strange algorithm when I try to overlay the images. For example if I overlay a grey image onto some base image, rather than assuming the pixels are 100% opacity pixels with an RGB of 128,128,128 (as they actually are), it seems to think they are 0,0,0 pixels with an opacity of 50%. I don't think this is the actual algorithm it is using but it is one example. The function I am using is as follows: MagickCompositeImage($image->outline,$image->base,MW_OverCompositeOp,0,0); As you can see I'm trying to overlay an outline onto a base image, but every time I try to do that, no matter which order I arrange the resources in the function in, it will output the grey base image "over" the black outline image (so that you can only see the edges of the outline that are visible underneath the grey base image). Is there a simpler way to overlay PNG images similar to gdlibrary's imagecopy function? 2. Change the colour of an image. Say I have pixels with RGB value x,y,z with a varying alpha channel. I want to change those pixels to a different RGB value but leave the alpha channel alone. Is there any way to do this? That is pretty much it for now. If anyone could help I would be so grateful! Thanks in advance.. Quote Link to comment https://forums.phpfreaks.com/topic/68789-imagemagickmagickwand-anyone-here-experienced/ Share on other sites More sharing options...
feuerfalke Posted September 11, 2007 Author Share Posted September 11, 2007 I'd really appreciate any help... I'm sorry for bumping this topic but since it hasn't been answered at all I hope it is okay. Quote Link to comment https://forums.phpfreaks.com/topic/68789-imagemagickmagickwand-anyone-here-experienced/#findComment-346235 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.