[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 bmz_gif_info.class.php

Zen Cart 源代码 bmz_gif_info.class.php




下载文件

文件名: bmz_gif_info.class.php
文件类型: PHP文件
文件大小: 1.51 KiB
MD5: 25dcc1af9da6b0ce7a3a5234e1bfdc8f

bmz_gif_info.class.php - 关闭高亮
  1. <?php
  2. /**
  3.  * gif_info.php
  4.  * gif-info class for transparency stuff
  5.  *
  6.  * @version $Id: bmz_gif_info.class.php,v 1.2 2006/04/11 22:00:55 tim Exp $
  7.  */
  8.  
  9.    class gifinfo
  10.    {
  11.        var $m_transparentRed;
  12.        var $m_transparentGreen;
  13.        var $m_transparentBlue;
  14.        var $m_signature;
  15.        var $m_version;
  16.        var $m_width;
  17.        var $m_height;
  18.        var $m_colorFlag;
  19.        var $m_backgroundIndex;
  20.      
  21.      
  22.        function gifinfo($filename)
  23.        {
  24.  
  25.            $fp                        = fopen($filename,"rb");
  26.            $result                    = fread($fp,13);
  27.            $this->m_signature    = substr($result,0,3);
  28.            $this->m_version        = substr($result,3,3);
  29.            $this->m_width        = ord(substr($result,6,1)) + ord(substr($result,7,1)) * 256;
  30.            $this->m_height        = ord(substr($result,8,1)) + ord(substr($result,9,1)) * 256;
  31.            $this->m_colorFlag    = ord(substr($result,10,1)) >> 7;
  32.            $this->m_background    = ord(substr($result,11));
  33.  
  34.            if($this->m_colorFlag)
  35.            {
  36.                $tableSizeNeeded = ($this->m_background + 1) * 3;
  37.                $result = fread($fp,$tableSizeNeeded);
  38.                $this->m_transparentRed    = ord(substr($result,$this->m_background * 3,1));
  39.                $this->m_transparentGreen    = ord(substr($result,$this->m_background * 3 + 1,1));      
  40.                $this->m_transparentBlue    = ord(substr($result,$this->m_background * 3 + 2,1));          
  41.            }
  42.            fclose($fp);
  43.        }
  44.    }


cron