cssEXp wrote:wait i want to make something clear, the "watermark_anim.gif" in your script, it is the overlaying image, yes? so can i watermark an image with an animated image? cause it didn't work that doing the following.
Code: Select all
exec("convert animated.gif -coalesce -gravity north-west -draw 'image over 5,5 0,0 \"animated_watermark.gif\"' watermarked_image.gif");
ONLY the
-layers composite method will handle proper multi-image composition, and that it does by using the 'trick' of seperating the two image lists with a special 'null:' image. ALL other composition methods are two images (+optional mask) alpha composition. The
-draw is a special case which can only overlay a single 'source' image onto a list. It is thus LIMITED. (see later)
I added the
-layers composite specifically to allow composition with animations, without needing a API to loop through each image pair one pair at a time!
Anyway has the following to be done prior to watermarking or can it be done along with it?
I assume the use of
-evaluate to 'dissolve' a whole list of images.
All
-dissolve is, is a function to multiply the alpha channel of the images being overlayed before they are overlaid. Similarly
-blend, does that same thing but it then 'adds' the color channels of the images, rather than overlays them.
Neither image processing operation is particularly fancy, but are only available (historically) in the "
composite" command, and that only deals with 2 images (+ optional mask), and never for a image sequence or animation.
anyway to implement the above in to the following
Code: Select all
exec("convert animated.gif -coalesce -gravity north-west -draw 'image over 5,5 0,0 \"watermark.gif\"' watermarked_image.gif");
and don't forget to mention firmly whether if it's possible to watermark image with an animated watermark image.
i don't have any good animated image, I'm mainly doing this to learn about IM's functionality so that i'll be better prepared if i have to use it in future. So i'm just using some animated gif files found on google.
[/quote]
As I discuss on the IM examples, Animation Modification page,
-draw can overlay a image against an image sequence, but only a single static 'source' image. Sure it can 'underlay' a source image under a list of images (see
draw an image onto a list of images) BUT the animation will be the one to define the size of the final image, so will still need to be enlarged appropritally. This means it is not a particularly nice solution.
So the question comes down to.
Are you IM version limited? that is can't you use
-layers composite?
Also are you trying to watermark an animation?
Or use a animation as a watermark on a larger image?
Also do you have some SMALL examples I can use to demonstrate?