PHP Classes
elePHPant
Icontem

Bug in class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Animated PNG Creator  >  All threads  >  Bug in class  >  (Un) Subscribe thread alerts  
Subject:Bug in class
Summary:The image is blinking
Messages:1
Author:Timur
Date:2011-06-02 17:05:21
 

  1. Bug in class   Reply   Report abuse  
Picture of Timur Timur - 2011-06-02 17:05:21
Hi, Dzsoni!

First of all thank you very much for such a wonderful class. Though I am facing one problem with it. The thing is that I am trying to make the class return me the generated animated PNG instead of writing it to a file. So, I just commented all the functions with files, created the $output variable and concatinated all the $out variables to $output at the locations where you use fwrite. At the end I just return the image. Then I set the required header in my script like:

Header ( 'Content-type:image/png');
ob_start();
echo $png->save();
$gen_im=ob_get_contents();
$file_size=ob_get_length();
ob_end_clean();

echo $gen_im;

The animation works but somehow empty frame appears and I do not know where it comes from. I checked all the frames I provide to the class - they are all fine when used separately. But if I add more than 1 frame it starts blinking again.

you can find the example here http://preloaders.net/blinking.png .
I modified your file as follows:
preloaders.net/class_sample.txt (lines 174, 175, 176, 194, 195, 248, 249 and 256)

Please help me. I really need this thing working.