CGIFIMAGEHEADER

The Gravity PDF CGIFIMAGEHEADER class.

Defined (1)

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

/vendor/blueliquiddesigns/mpdf/classes/gif.php  
  1. class CGIFIMAGEHEADER 
  2.  
  3. var $m_nLeft; 
  4.  
  5. var $m_nTop; 
  6.  
  7. var $m_nWidth; 
  8.  
  9. var $m_nHeight; 
  10.  
  11. var $m_bLocalClr; 
  12.  
  13. var $m_bInterlace; 
  14.  
  15. var $m_bSorted; 
  16.  
  17. var $m_nTableSize; 
  18.  
  19. var $m_colorTable; 
  20.  
  21. public function __construct() 
  22. unSet($this->m_nLeft); 
  23. unSet($this->m_nTop); 
  24. unSet($this->m_nWidth); 
  25. unSet($this->m_nHeight); 
  26. unSet($this->m_bLocalClr); 
  27. unSet($this->m_bInterlace); 
  28. unSet($this->m_bSorted); 
  29. unSet($this->m_nTableSize); 
  30. unSet($this->m_colorTable); 
  31.  
  32. function load($lpData, &$hdrLen) 
  33. $hdrLen = 0; 
  34.  
  35. $this->m_nLeft = $this->w2i(substr($lpData, 0, 2)); 
  36. $this->m_nTop = $this->w2i(substr($lpData, 2, 2)); 
  37. $this->m_nWidth = $this->w2i(substr($lpData, 4, 2)); 
  38. $this->m_nHeight = $this->w2i(substr($lpData, 6, 2)); 
  39.  
  40. if (!$this->m_nWidth || !$this->m_nHeight) { 
  41. return false; 
  42.  
  43. $b = ord($lpData{8}); 
  44. $this->m_bLocalClr = ($b & 0x80) ? true : false; 
  45. $this->m_bInterlace = ($b & 0x40) ? true : false; 
  46. $this->m_bSorted = ($b & 0x20) ? true : false; 
  47. $this->m_nTableSize = 2 << ($b & 0x07); 
  48. $hdrLen = 9; 
  49.  
  50. if ($this->m_bLocalClr) { 
  51. $this->m_colorTable = new CGIFCOLORTABLE(); 
  52. if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) { 
  53. return false; 
  54. $hdrLen += 3 * $this->m_nTableSize; 
  55.  
  56. return true; 
  57.  
  58. function w2i($str) 
  59. return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); 
  60.