Today at the company, the manager lets make a scrolling subtitle. However, you are not allowed to generate GIF images. So the internet to find Gifencoder this class library. Really good, but, the application process also appeared some problems, now written here, for Yimeimei reference, less detours.
Text scrolling is divided into two situations. The first type is horizontal scrolling:Copy CodeThe code is as follows:Require_once ("GIFEncoder.class.php
The following post-processing source code:
Copy CodeThe code is as follows:
Require_once ("gifencoder.php"); Loading encoded files
$gif = new Gifencoder (); Instantiate a GIF decoding object
$gif->load ("Test.gif"); Load the GIF image to decode
for ($i =0; $i
Imgs["Frames"]) ($i + +) {//image data per frame based on
I believe many people have thought how to use PHP to generate GIF animation to achieve dynamic picture verification code, the following is the implementation process.
Imagecode function through the Gifencoder class implementation of the GIF animated PHP source code, interested friends can study.
EffectCopy CodeThe code is as follows:/** * Imagecode generate GIF
Look first.
The path to the font and font files needs to be set in $fontfilepath and $fontfilename in the class. Such as:Copy the Code code as follows:private static $FontFilePath = "static/font/"; Location relative to this code fileprivate static $FontFileName = Array ("3.ttf");//Array ("1.ttf", "2.ttf", "3.ttf", "4.ttf", "5.ttf", "6.ttf", "7.ttf", "8.t" TF "); //The complete code is as follows:Copy the Code code as follows:
/**Description: Verification code generation class, support t
A basic principle of realization
In the introduction of the specific implementation process, the first simple to say the basic principles and implementation steps, in the solution of relatively complex problems, I am accustomed to first clear the main principle of the steps, do not start by the cumbersome details of the trip, waiting for the specific implementation and then one by one. The following are the main steps:
1, video file reading: including recording and local file reading
2, the n
Send a real-running example of a dynamic CAPTCHA image generated by PHP. Online Download a lot of error, so I integrated all aspects of the views, and finally completed such an effect.
Here are the related classes and functions that PHP needs to generate the dynamic verification code.
/***imagecode a function to generate a GIF picture containing a CAPTCHA* @param $string string* @param $width width* @param $height Height**/function Imagecode ($st
To give you Photoshop software users to elaborate on the video to make GIF pictures of the production tutorial.
Tutorial Sharing:
GIF is divided into static GIF and animated GIF Two, the extension of. gif, is a compressed bitmap format, supporting
Display GIF animation on WinForm
The ProgressBar on WinForm, to be honest, is really not flattering, too rigid, too ugly, even if it is made to display the processing progress in real time, it still cannot escape "ugly ". A small circle that is being processed can be seen everywhere in the current web to indicate that it is being processed. Although it is not real-time, it is just a GIF animation, however,
Look at the effect chart first
The path to the font and font files needs to be set in $fontfilepath and $fontfilename in the class. Such as:
Copy Code code as follows:
private static $FontFilePath = "static/font/"; Relative to the location of this code file
private static $FontFileName = Array ("3.ttf");//Array ("1.ttf", "2.ttf", "3.ttf", "4.ttf", "5.ttf", "6.ttf", "7.ttf", "8.t") TF "); //
The complete code is as follows:
Copy Code code as follows:
? Php
First you need to verify that the GD library is normal, and if it is a composite picture, make sure you put the exploded picture in the Frames folder. GIFEncoder.class.php class
? Class Gifencoder {var $GIF = "gif89a"; /* GIF Header 6 bytes * * var $VER = "Gifencoder V2.06";
/* Encoder version */var $BUF = Array ();
var $LOP = 0;
var $DIS = 2;
var $COL =-1;
v
Final effect diagram:
Figure 01
First, the pruning animation
First, you need to open the video file in Photoshop. Most of the time, our GIF animated images do not require a full sequence of animations, so we can trim the video in the timeline panel. Open the operator panel and trim your video.
Figure 02
Second, reduce the size of the image
Reduce the size of the image, you can either operate in the Image menu, or in the
Although it was once regarded as an outdated art form, dynamic GIF images are now recovering. If you haven't noticed that many online sharing and social network websites are beginning to support dynamic GIF images, such as Tumblr, Flickr, Google +, and Facebook. Because of its ease of consumption and sharing, GIF animation has become part of mainstream Internet c
PHP compositing or creating GIF animations
1. First, you need to confirm the GD library is normal.
?
2. How to compose a picture, make sure to place the exploded image in the frames folder.
?
3. GIFEncoder.class.php class
?
?
"Does not supported function for only one image!", ' ERR01 ' = ' = ' Source is not a GIF image! ', ' ERR02 ' = ' unintelligible flag ', ' ERR03 ' = ' Could not make animatio
We know that GIF is made up of waves of pictures, and each frame of the screen playback may be unequal, observe the above two examples, found that they do not have a GIF in each frame of the display often do processing, the result is that the entire GIF frame screen is at a fixed speed to play forward, Obviously it doesn't always fit the demand.So I write an anal
How to display GIF images in iOS developmentWe know that a Gif is composed of a burst of pictures, and the playing of each frame may often be different. Observe the above two examples, they do not often process the display of each frame in the Gif. The result is that each frame in the Gif is played forward at a fixed s
What format is PNG? This question is one of the most frequently asked questions of many computer novices. Well, given the number of novice computers, let's explain what the PNG format is. In fact, the answer is very simple, we just know that the picture format can be. Perhaps many novice friends see the picture format are JPG and GIF. To forget what the PNG format is, here are the next PNG, JPG, GIF forma
The original meaning of GIF (Graphics Interchange Format) is "Image Interchange Format", an image file format developed by CompuServe Company in 1987. GIF file data, is a continuous based on the LZW algorithm
Lossless compression format for tones. Its compression rate is generally around 50%, it does not belong to any application. At present, almost all of the relevant software support it, the public domai
We all know that images on webpages are generally in JPG, GIF, and PNG formats. What are their differences? after reading the following content, you may come to your own conclusions.
GIF format features:
Transparency GIF Is a Boolean transparent type, which can be both fully transparent and non-transparent, but it is not translucent ( Alpha Trans
Sometimes, when we see some funny videos, we can choose to make animated GIF images. How can we convert videos to gif images? In fact, it is very simple. a gif production tool can be easily used. Which GIF production tool is better? We recommend quick GIF production tools fo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.