| 
| Subject: | You should have added an exemple... | 
|---|
 | Summary: | Package rating comment | 
|---|
 | Messages: | 5 | 
|---|
 | Author: | daniel miao | 
|---|
 | Date: | 2007-12-22 15:34:26 | 
|---|
 | Update: | 2007-12-24 03:37:00 | 
|---|
 |  |  |  | 
daniel miao rated this package as follows:
| Utility: | Good | 
|---|
| Consistency: | Not sure | 
|---|
| Examples: | Bad | 
|---|
|  | 
  daniel miao - 2007-12-22 15:34:26You should have added an exemple with a binary-data image.
  László Zsidi - 2007-12-22 20:44:27 - In reply to message 1 from daniel miaoDid you mean such a binary-data which has been created by binary php functions?
 Please, let me know whatever you want to know about binary function of zhis class?
  daniel miao - 2007-12-23 15:30:30 - In reply to message 2 from László ZsidiThank for the quick reply,
 When i tryed to use images that was created by imagecreatefromgif(url) and i added them some text, it said that the images weren't valid gif images, can you check it?
 
 thank you. Daniel
  László Zsidi - 2007-12-24 03:28:32 - In reply to message 3 from daniel miaoThe solution is very simple and very effective:)Must be used the ob_start and ob_get_contents functions to pass the variables that have conatints binary-image-data into the class constructor such as:
 
 <?php
 $frames = array ( );
 $framed = array ( );
 $original = imagecreatefromgif("original_gif_image.gif");
 /* $edited = Made some additional text functions... */
 imagedestroy ( $original );
 ob_start ( );
 imagegif ( $edited );
 $frames [ ] = ob_get_contents ( );
 $framed [ ] = /* Your own delayed times */
 ob_end_clean ( );
 
 /* Must be used to construct class the 'bin' flag instead of 'url' flag */
 $GIF = new GIFEncoder ( $frames , $framed , 0, 2, -1, -1, -1, "bin" );
 header ( 'Content-type:image/gif' );
 header ( 'Content-disposition:attachment;filename=testanim.gif' );
 echo $GIF->GetAnimation ( );
 ?>
  László Zsidi - 2007-12-24 03:37:00 - In reply to message 4 from László ZsidiMore additional informations can be found at the http://www.phpclasses.org/discuss/package/3163/thread/1/ C_MEMORY topic about the binary-image-content functions.Don't wonder, this topic created for the older GIFEncoder version and there was used C_MEMORY flag instead of "bin" flag.
 |