PHP Classes

File: tests/ExtractGif.Test1.php

Recommend this page to a friend!
  Classes of Asbjorn Grandt   PHP GIF Resizer   tests/ExtractGif.Test1.php   Download  
File: tests/ExtractGif.Test1.php
Role: Example script
Content type: text/plain
Description: Gif frame extraction example
Class: PHP GIF Resizer
Resize images and animations based on the GIF89a
Author: By
Last change:
Date: 9 years ago
Size: 516 bytes
 

Contents

Class file image Download
<?php
error_reporting
(E_ALL | E_STRICT);
ini_set('error_reporting', E_ALL | E_STRICT);
ini_set('display_errors', 1);

include
"../vendor/autoload.php";

use
grandt\ResizeGif\ExtractGif;

// Rotating_earth and SmallFullColourGIF are from the GIF Wikipedia page.
// $srcFile = 'resources/Rotating_earth_(large).gif';
$srcFile = 'resources/SmallFullColourGIF.gif';
//$srcFile = 'resources/frame_diff_ir2t.gif';
// $srcFile = 'test.gif';

ExtractGif::extract($srcFile, "."); // Dump the frames in the current directory.