<?php
require_once "./APNG_Creator/APNG_Creator.php";
$default_image = imagecreatetruecolor(332, 36);
$background = imagecolorallocate($default_image, 255, 255, 255);
imagefill($default_image, 0, 0, $background);
$color = imagecolorallocate($default_image, 255, 0, 0);
imagestring($default_image, 5, 11, 11, "Your browser does NOT support APNG!", $color);
$frame1 = imagecreatetruecolor(332, 36);
imagefill($default_image, 0, 0, $background);
$color = imagecolorallocate($frame1, 20, 255, 20);
$background = imagecolorallocate($frame1, 0, 0, 0);
imagefill($frame1, 0, 0, $background);
imagestring($frame1, 5, 11, 11, "Your browser supports APNG!", $color);
// Creating the animation
$animation = new APNG_Creator();
$animation->save_alpha = false;
$animation->save_time = false;
$animation->add_image($default_image, null, 1000, 0, 0, false); // this image won't be the part of the animation
$animation->add_image($frame1, null, 0, 0, 0);
$animation->save("./browser_test.png");
$animation->destroy_images();
?>