PHP Classes

Bug in class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      Animated PNG Creator  >  All threads  >  Bug in class  >  (Un) Subscribe thread alerts  
Subject:Bug in class
Summary:The image is blinking
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');
echo $png->save();

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 .
I modified your file as follows: (lines 174, 175, 176, 194, 195, 248, 249 and 256)

Please help me. I really need this thing working.