Animated GIFS and drop shadows PHP
Upcoming SlideShare
Loading in...5

Animated GIFS and drop shadows PHP



Learn the how to create animated gifs using images and text. Also learn how to add a drop shadow to an image.

Learn the how to create animated gifs using images and text. Also learn how to add a drop shadow to an image.



Total Views
Views on SlideShare
Embed Views



3 Embeds 24 22 1 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Animated GIFS and drop shadows PHP Animated GIFS and drop shadows PHP Presentation Transcript

  • Animated Gifs and Drop Shadows
  • OverviewObjectiveLearn the how to create animated gifs using images and text.Also learn how to add a drop shadow to an image.Requirements Understanding of Image Basics Installed version of ImagickEstimated Time10 minutes
  • Follow Along With A Code Example1. Download a copy of the example code at Install the system in an environment you feel comfortable testing in.3. Proceed to examples/avi/ImageAnimationsandShadows.php
  • Animated GifsAnimated gifs are multiple images comprised in one giffile. To begin this tutorial, we are going to create multipleimages of a circle at different degrees.1. Create an array to store the gifs in 2.Create an ellipse with different end angles 3. Add the return location of the ellipses to the images array
  • Gif ImagesIf you were to take a second and look at the imagescreated, you should have 10 images in your file systemthat look something like below.
  • Creating The AnimationThose 10 image locations are in the array we created. Now wecan pass that array into PVImage::animateImage and we willget a gif of a completing circle. 1. The array of images 2. The newly created gif
  • Text GifsWe can create animated gifs not only with images, butwith text also. The process is very similar, create an arraywith text at different index.
  • GIF OptionsThis time we are going to customize the gif creationprocess some by creating an array of options
  • Animate The TextThe array of string and the options are passed intoPVImage::animateText() and we get an animated gif.1. The array of text 2. Options3. Location of the new gif
  • Drop ShadowCreating a drop shadow is pretty easy. All we need is an imageto add the drop shadow too and then pass the location of thatimage into PVImage::drawDropShadow.1. The location of the image 3. Returns a path to the image 2. Pass the image in
  • Drop ShadowIt’s not much, but we’ve manage to add a small dropshadow in the image. A tiny drop shadow
  • Drop Shadow OptionsWe can do a little better with that drop shadow. Let’s addsome options in to make the drop shadow a little moreapparent.1. Set the options to change to position of the drop shadow 2. Pass the options to create the drop shadow
  • Better Drop ShadowThere, that’s more of a drop shadow now. A little tweakingand the drop shadow position and color can be changed. A better drop shadow
  • Review1. Create an animated gif with images using PVImage::animateImage()2. Create an animated gif with text using PVImage::animateText()3. Create a drop shadow on an image using PVImage::drawDropShadow()
  • API ReferenceFor a better understanding of the image manipulation, checkout the api at the two links below.PVImage More Tutorials For more tutorials, please visit: