PHP Classes

C_MEMORY Parameter

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  C_MEMORY Parameter  >  (Un) Subscribe thread alerts  
Subject:C_MEMORY Parameter
Summary:How to use
Messages:28
Author:Felipe
Date:2006-06-17 13:31:00
Update:2006-09-25 20:42:31
 
  1 - 10   11 - 20   21 - 28  

  21. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of renaud renaud - 2006-07-09 17:09:00 - In reply to message 20 from renaud
Hi, me again ;-)

Do you know why the delay is not the same on the web server and in my local host ? this is very strange !
And more, even if I change the delay variable in my script, no change on the animated gif !
All was perfect on my local host...

Do you have an idea ?
Best Regards.

  22. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2006-07-10 04:25:04 - In reply to message 21 from renaud
Hi,

Try to review how to fill up delay array and try to check how to pass to the constructor most likely.

How to call the GifMerge class from your subsite?
Can you write me the setup process and the call method of class?
I'd like to review your code.

  23. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of Jano Jano - 2006-08-13 20:47:16 - In reply to message 22 from László Zsidi
Thanks a lot for Class. It is really superb, it is pitty it is hosted only here. But anyway I will recommend that on php man pages. Again gr8 work!

  24. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of roy roy - 2006-08-21 18:24:33 - In reply to message 15 from László Zsidi
Hello László

I'm Roy from the UK - thanks for writing this class, and supporting it !!!

I'm going to use it on a new website idea, when you say link to me do you mean link to http://gifs.hu ?


  25. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of roy roy - 2006-08-23 16:21:18 - In reply to message 24 from roy
What I want visitors to do is right click and “Save picture As….” How can I put “.gif” on the end of the name? because my visitors will forget to give the name an extension when they save it.

Any ideas?

  26. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2006-08-26 14:32:22 - In reply to message 25 from roy
Hi Roy,

Sorry for my slow reaction, I was holiday...:)
You can set the output filename and extension by http headers.

Header('Content-type: image/gif'); // GIF image
Header('Content-disposition: attachment; filename: image.gif'); // Filename

  27. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of Kevin Hereman Kevin Hereman - 2006-09-25 18:12:29 - In reply to message 2 from László Zsidi
Hello,
great class indeed...congratulations on your work.

However, I cannot generate a dynamic GIf with the C_MEMORY parameter.

Following code does not work...What am I doing wrong?

header('Content-type: image/gif');
require('GifMerge.class.php');
$image = @imagecreatefromgif('images/frame01.gif');
$image2 = @imagecreatefromgif('images/frame05.gif');
ob_start();
imagegif($image);
$frames[0] = ob_get_contents;
ob_end_clean();
ob_start();
imagegif($image2);
$frames[1] = ob_get_contents;
ob_end_clean();

$d = array(10, 10);

$x = array(0, 0);

$y = array(0, 0);
imagedestroy($image);
imagedestroy($image2);

$anim = new GifMerge($frames, 0, 255, 255, 0, $d, $x, $y, 'C_MEMORY');
echo $anim->getAnimation();

  28. Re: C_MEMORY Parameter   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2006-09-25 20:42:31 - In reply to message 27 from Kevin Hereman
Hi,

Unfortunately you forget the brackets from ob_get_contents functions.

The working script:

<?php
header('Content-type: image/gif');

require('GifMerge.class.php');

$image = @imagecreatefromgif('frame01.gif');

$image2 = @imagecreatefromgif('frame05.gif');

ob_start();

imagegif($image);

$frames[] = ob_get_contents ( ); // Don't forget brackets!

ob_end_clean();

ob_start();

imagegif($image2);

$frames[] = ob_get_contents ( ); // Don't forget brackets!

ob_end_clean();

$d = array(10, 10);

$x = array(0, 0);

$y = array(0, 0);

imagedestroy($image);
imagedestroy($image2);

$anim = new GifMerge($frames, 0, 255, 255, 0, $d, $x, $y, 'C_MEMORY');
echo $anim->getAnimation();
?>

Good luck,

László Zsidi

 
  1 - 10   11 - 20   21 - 28