CGIF

The Gravity PDF CGIF class.

Defined (1)

The class is defined in the following location(s).

/vendor/blueliquiddesigns/mpdf/classes/gif.php  
  1. class CGIF 
  2.  
  3. var $m_gfh; 
  4.  
  5. var $m_lpData; 
  6.  
  7. var $m_img; 
  8.  
  9. var $m_bLoaded; 
  10.  
  11. public function __construct() 
  12. $this->m_gfh = new CGIFFILEHEADER(); 
  13. $this->m_img = new CGIFIMAGE(); 
  14. $this->m_lpData = ""; 
  15. $this->m_bLoaded = false; 
  16.  
  17. function ClearData() 
  18. $this->m_lpData = ''; 
  19. unSet($this->m_img->m_data); 
  20. unSet($this->m_img->m_lzw->Next); 
  21. unSet($this->m_img->m_lzw->Vals); 
  22. unSet($this->m_img->m_lzw->Stack); 
  23. unSet($this->m_img->m_lzw->Buf); 
  24.  
  25. function loadFile(&$data, $iIndex) 
  26. if ($iIndex < 0) { 
  27. return false; 
  28. $this->m_lpData = $data; 
  29.  
  30. // GET FILE HEADER 
  31. $len = 0; 
  32. if (!$this->m_gfh->load($this->m_lpData, $len)) { 
  33. return false; 
  34.  
  35. $this->m_lpData = substr($this->m_lpData, $len); 
  36.  
  37. do { 
  38. $imgLen = 0; 
  39. if (!$this->m_img->load($this->m_lpData, $imgLen)) { 
  40. return false; 
  41. $this->m_lpData = substr($this->m_lpData, $imgLen); 
  42. } while ($iIndex-- > 0); 
  43.  
  44. $this->m_bLoaded = true; 
  45. return true; 
  46.