Animated Gif PHP

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
HaZzard

Animated Gif PHP

Post by HaZzard »

Hey,

i try to write some Text to an Animated GIF.

Code: Select all

exec("convert new.gif -font Arial -fill white -pointsize 20 -annotate +50+50 'TextText' out/test.gif");
The Problem is that the gif is created but no text on it :/

HaZz
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Animated Gif PHP

Post by Bonzo »

This worked for me:

Code: Select all

<?php
$animation = "morph.gif";

$watermark = "output.png";

$watermarked_animation = "morph.gif";

exec("convert -resize 100x200 $animation -coalesce -gravity South \\
 -geometry +0+0 null: $watermark -layers composite -layers optimize $watermarked_animation ");
?> 
http://www.rubblewebs.co.uk/imagemagick ... =morph.gif

In this case the text was in a png image, I do not know if the same code will work for text.
HaZzard

Re: Animated Gif PHP

Post by HaZzard »

Hey,
the main Problem is that the Text is dynamic!

Edit:
i tested this with this command:

Code: Select all

convert sig_dwarf.gif -coalesce -gravity South -geometry +0+0 null: test.png -layers composite -layers optimize output.gif
but there isn´t a output.gif :/
Regards HaZz
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Animated Gif PHP

Post by anthony »

I think we need some examples of what you are trying to do, if we are to make any sense.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply