PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

speedup plus potential bug fix

  1. sboisvert@bryxal.ca
    Member

    in display_signature()
    there are calls to
    imagepng($image);
    imagedestroy($image);
    that are needless, since the image is already created you can just do this:
    $fp = fopen($folder . $imagename, 'rb'); # stream the image directly from the cachefile
    fpassthru($fp);

    instead of reprocessing it thru GD. (this was taken from PHP.net here: http://php.net/manual/en/function.imagepng.php)

    Also we had a bug where ob_start had previously been called. So we needed to clean the output buffer first.
    this will clean out all the buffers:
    $levels = ob_get_level();
    for ($i=0; $i<$levels; $i++)
    ob_end_clean();

    Posted 12 years ago on Thursday February 23, 2012 | Permalink

This topic has been resolved and has been closed to new replies.