亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? class.image.php5.php

?? axjx工具代碼給大家交流
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php
/**************************************************************************
 * CLASS clsImage [PHP5] v1.0 09.12.2004      
 *
 * http://www.zutz.nl/phpclasses
 *
 * this is an image manipulation class for PHP5 with the Zend engine
 * based on the GD Library. supported imagetypes: [ jpg | gif | png ]
 * 
 * LICENSE
 * Public domain
 *
 * MODERATOR
 * Ronald Z鰐sch - ZUTZ Automatisering
 **************************************************************************/
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
    include_once ("class.image.config.win.php");
else 
    include_once ("class.image.config.unix.php");
include ("class.image.interface.php");

class clsImage implements interfaceImage {
/* constants */
  const IMAGEBASEURL = IMAGEBASEURL;
  const IMAGEBASEPATH = IMAGEBASEPATH;
  const IMAGEFONTDIR = IMAGEFONTDIR;
	const IMAGEINTERLACE = IMAGEINTERLACE;
	const IMAGEJPEGQUALITY = IMAGEJPEGQUALITY;
	const IMAGEDEBUG = IMAGEDEBUG;
	
/* properties */
  private $ImageStream;
  private $aProperties;
	protected $sFileLocation;
  protected $sImageURL;
  protected $IMAGEBASEURL;
  protected $IMAGEBASEPATH;
		
	public $interlace;
	public $jpegquality;	

/* default methods */
  function __construct($path="", $url="") {
	/* constructor */
	  $this->aProperties = array();
		$this->jpegquality = clsImage::IMAGEJPEGQUALITY;
		
		/* set interlace boolean */
		if (clsImage::IMAGEINTERLACE != 0) {
		  $this->interlace = true;
		}
		else {
		  $this->interlace = false;		
		}
		$this->IMAGEBASEURL = ($url=="")?clsImage::IMAGEBASEURL:$url;
    $this->IMAGEBASEPATH = ($path=="")?clsImage::IMAGEBASEPATH:$path;
	}
	
  function __destruct() {
	/* destructor */
    unset($this->ImageStream);
    unset($this->aProperties);
	}
	
  public function __get($sPropertyName) {
	/* get properties */
		if (isset($this->aProperties[$sPropertyName])) {
		  $sPropertyValue = $this->aProperties[$sPropertyName];
		}
		else {	
      $sPropertyValue = NULL;
		}
		
    return($sPropertyValue);
  }
	
  private function __set($sPropertyName, $sPropertyValue) {
	/* set properties */
		if (!isset($this->aProperties)) {
		  $this->aProperties = array();
		}

    $this->aProperties[$sPropertyName] = $sPropertyValue;			
  }		
	
/* private methods */
	private function printError($sMessage, $sMethod = __METHOD__, $sLine = __LINE__) {
	/* echo errormessage to client and terminate script run */
	  if(clsImage::IMAGEDEBUG == 1) {
		  echo $sMethod . "(" . $sLine . ") " . $sMessage;
    }

	  if(clsImage::IMAGEDEBUG == 2) {
			header("Location: class.image.debug.code.php?line={$sLine}#{$sLine}");
    }

		exit;	
	}
	
  private function loadImage() {
	/* load a image from file */
	  switch($this->type) {
		  case 1: 
			  $this->ImageStream = @imagecreatefromgif($this->sFileLocation);
			  break;
			case 2:
			  $this->ImageStream = @imagecreatefromjpeg($this->sFileLocation);			
			  break;
			case 3: 
			  $this->ImageStream = @imagecreatefrompng($this->sFileLocation);			
			  break;
			default: 
			  $this->printError('invalid imagetype',__METHOD__,__LINE__); 
		}	
		
    if (!$this->ImageStream) {
		  $this->printError('image not loaded',__METHOD__,__LINE__); 
    }		
	}
	
  private function saveImage() {
	/* store a memoryimage to file */
    if (!$this->ImageStream) {
		  $this->printError('image not loaded',__METHOD__,__LINE__); 
    }

    /*ensure the dir*/
	$i = explode(DIRECTORY_SEPARATOR, $this->sFileLocation);
	$path = array_shift($i);
	for ($j=0,$k=count($i);$j<$k-1;$j++) {
		$path .= DIRECTORY_SEPARATOR.$i[$j];
		if (!is_dir($path)) {
			if (!@mkdir($path)){
			    $this->printError("Can\'t make dir --$path",__METHOD__,__LINE__); 
			}
		}
	}


	  switch($this->type) {
		  case 1: 
			  /* store a interlaced gif image */
			  if ($this->interlace === true) {
   			  imageinterlace($this->ImageStream, 1);
				}
				
			  imagegif($this->ImageStream,$this->sFileLocation);
			  break;
			case 2:
			  /* store a progressive jpeg image (with default quality value)*/
			  if ($this->interlace === true) {
   			  imageinterlace($this->ImageStream, 1);
				}
				
			  imagejpeg($this->ImageStream,$this->sFileLocation,$this->jpegquality);							
			  break;
			case 3: 
			  /* store a png image */
			  imagepng($this->ImageStream,$this->sFileLocation);			
			  break;
			default: 
			  $this->printError('invalid imagetype',__METHOD__,__LINE__); 
				
			if (!file_exists($this->sFileLocation)) {
				$this->printError('file not stored',__METHOD__,__LINE__); 		
			}				
		}			
	}	
	
  private function showImage() {
	/* show a memoryimage to screen */
    if (!$this->ImageStream) {
		  $this->printError('image not loaded',__METHOD__,__LINE__); 
    }
		
	  switch($this->type) {
		  case 1: 
			  imagegif($this->ImageStream);
			  break;
			case 2:
			  imagejpeg($this->ImageStream);			
			  break;
			case 3: 
			  imagepng($this->ImageStream);			
			  break;
			default: 
			  $this->printError('invalid imagetype',__METHOD__,__LINE__); 				
		}			
	}	
	
  private function setFilenameExtension() {
	/* set the imahe type and mimetype */
	  $sOldFilenameExtension = substr($this->filename,strlen($this->filename) - 4, 4);
		if (($sOldFilenameExtension != '.gif') &&
		    ($sOldFilenameExtension != '.jpg') &&
			  ($sOldFilenameExtension != '.png')) {
			$this->printError('invalid filename extension',__METHOD__,__LINE__);
		}
		
	  switch($this->type) {
		  case 1: 
			  $this->filename = substr($this->filename,0,strlen($this->filename) - 4) . '.gif';
			  break;
			case 2:
			  $this->filename = substr($this->filename,0,strlen($this->filename) - 4) . '.jpg';			
			  break;
			case 3: 
			  $this->filename = substr($this->filename,0,strlen($this->filename) - 4) . '.png';			
			  break;
			default: 
			  $this->printError('invalid imagetype',__METHOD__,__LINE__); 
		}			
	} 

  private function setImageType($iType) {
	/* set the imahe type and mimetype */
	  switch($iType) {
		  case 1: 
			  $this->type = $iType;
			  $this->mimetype = 'image/gif';
				$this->setFilenameExtension();
			  break;
			case 2:
			  $this->type = $iType;
			  $this->mimetype = 'image/jpeg';
				$this->setFilenameExtension();							
			  break;
			case 3: 
			  $this->type = $iType;
			  $this->mimetype = 'image/png';
				$this->setFilenameExtension();							
			  break;
			default: 
			  $this->printError('invalid imagetype',__METHOD__,__LINE__); 
		}			
	}

	private function setLocations($sFileName) {
  /* set the photo url */
	  $this->filename = $sFileName;
    $this->sFileLocation = $this->IMAGEBASEPATH . DIRECTORY_SEPARATOR . $this->filename;
    $this->sImageURL = $this->IMAGEBASEURL . '/' . $this->filename;		
	}
	
	public function setPathAndURL($path="",$url=""){
    $this->IMAGEBASEPATH = ($path=="")?$this->IMAGEBASEPATH:$path;
    $this->IMAGEBASEURL = ($url=="")?$this->IMAGEBASEURL:$url;
  } 
	
	private function initializeImageProperties() {
	/* get imagesize from file and set imagesize array */
	  list($this->width, $this->height, $iType, $this->htmlattributes) = getimagesize($this->sFileLocation);

		if (($this->width < 1) || ($this->height < 1)) {
		  $this->printError('invalid imagesize',__METHOD__,__LINE__); 
		}			 
		
		$this->setImageOrientation();
		$this->setImageType($iType);
	}

	private function setImageOrientation() {
	/* get image-orientation based on imagesize
	   options: [ portrait | landscape | square ] */
		 
		if ($this->width < $this->height) {
		  $this->orientation = 'portrait';
		}
		
		if ($this->width > $this->height) {
		  $this->orientation = 'landscape';
		}
		
		if ($this->width == $this->height) {
		  $this->orientation = 'square';
		}							
	}	
		
/* public methods */
	public function loadfile($sFileName) {
	/* load an image from file into memory */
	  $this->setLocations($sFileName);
		
		if (file_exists($this->sFileLocation)) { 		
		  $this->initializeImageProperties();
      $this->loadImage();
		}
		else {
		  $this->printError('file not found',__METHOD__,__LINE__); 
		}

	}
	
	public function savefile($sFileName = NULL) {
  /* store memory image to file */
	  if ((isset($sFileName)) && ($sFileName != '')) {
      $this->setLocations($sFileName);
		}	
	 
    $this->saveImage();
	}	
	
	public function preview() {
  /* print memory image to screen */
		header("Content-type: {$this->mimetype}");
    $this->showImage();	
	}	

	public function showhtml($sAltText = NULL, $sClassName = NULL) {
  /* print image as htmltag */
		if (file_exists($this->sFileLocation)) {
		  /* set html alt attribute */
		  if ((isset($sAltText)) && ($sAltText != '')) {
			  $htmlAlt = " alt=\"".$sAltText."\"";
			}
			else {
			  $htmlAlt = "";
			}
			
		  /* set html class attribute */
		  if ((isset($sClassName)) && ($sClassName != '')) {
			  $htmlClass = " class=\"".$sClassName."\"";
			}
			else {
			  $htmlClass = " border=\"0\"";
			}			
			
	    $sHTMLOutput = '<img src="'.$this->sImageURL.'"'.$htmlClass.' width="'.$this->width.'" height="'.$this->height.'"'.$htmlAlt.'>';	
			print $sHTMLOutput;
		}
		else {
		  $this->printError('file not found',__METHOD__,__LINE__); 
		}	
	}
	
	public function resize($iNewWidth, $iNewHeight) {
	/* resize the memoryimage do not keep ratio */
    if (!$this->ImageStream) {
		  $this->printError('image not loaded',__METHOD__,__LINE__); 
    }    
			
		if(function_exists("imagecopyresampled")){
			$ResizedImageStream = imagecreatetruecolor($iNewWidth, $iNewHeight);
			imagecopyresampled($ResizedImageStream, $this->ImageStream, 0, 0, 0, 0, $iNewWidth, $iNewHeight, $this->width, $this->height);
		}
		else{
			$ResizedImageStream = imagecreate($iNewWidth, $iNewHeight);
				imagecopyresized($ResizedImageStream, $this->ImageStream, 0, 0, 0, 0, $iNewWidth, $iNewHeight, $this->width, $this->height);
		}		
		
		$this->ImageStream = $ResizedImageStream;
		$this->width = $iNewWidth;
		$this->height = $iNewHeight;
		$this->setImageOrientation();		
	}	
	
	public function cut($x, $y, $iNewWidth=-1, $iNewHeight=-1) {
	/* resize the memoryimage do not keep ratio */
    if (!$this->ImageStream) {
		  $this->printError('image not loaded',__METHOD__,__LINE__); 
    }    
		if($x>$this->width||$y>$this->height){
      return;
    }
    
		if($iNewWidth<0){
      $iNewWidth = $this->width - $x;
    }else{
      $iNewWidth = max(0,min($this->width - $x,$iNewWidth));
    }
		if($iNewHeight<0){
      $iNewHeight = $this->height - $y;
    }else{
      $iNewHeight = max(0,min($this->height - $y,$iNewHeight));
    }
		
		if(function_exists("imagecopyresampled")){
			$ResizedImageStream = imagecreatetruecolor($iNewWidth, $iNewHeight);
			imagecopyresampled($ResizedImageStream, $this->ImageStream, 0, 0, $x, $y, $iNewWidth, $iNewHeight, $iNewWidth, $iNewHeight);
		}
		else{
			$ResizedImageStream = imagecreate($iNewWidth, $iNewHeight);
			imagecopyresized($ResizedImageStream, $this->ImageStream, 0, 0, $x, $y, $iNewWidth, $iNewHeight, $iNewWidth, $iNewHeight);
		}		
		
		$this->ImageStream = $ResizedImageStream;
		$this->width = $iNewWidth;
		$this->height = $iNewHeight;
		$this->setImageOrientation();		
	}	
	
	public function resizetowidth($iNewWidth) {
  /* resize image to given width (keep ratio) */
		$iNewHeight = ($iNewWidth / $this->width) * $this->height;
		$this->resize($iNewWidth,$iNewHeight); 		
	}	
	
	public function resizetoheight($iNewHeight) {
  /* resize image to given height (keep ratio) */
		$iNewWidth = ($iNewHeight / $this->height) * $this->width;
		$this->resize($iNewWidth,$iNewHeight); 		
	}	
	
	public function resizetopercentage($iPercentage) {
  /* resize image to given percentage (keep ratio) */
		$iPercentageMultiplier = $iPercentage / 100;
		$iNewWidth = $this->width * $iPercentageMultiplier;
		$iNewHeight = $this->height * $iPercentageMultiplier;		
		
    $this->resize($iNewWidth,$iNewHeight);		
	}	
	

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品久久99精品久久| 成人永久免费视频| 国产成人午夜精品影院观看视频| 91蝌蚪porny| 久久综合九色综合久久久精品综合| 中文字幕日韩一区| 国产一区二区三区黄视频| 欧美色涩在线第一页| 国产精品国产精品国产专区不片| 免费看欧美女人艹b| 欧美影院一区二区三区| 国产精品国产三级国产aⅴ无密码| 麻豆国产精品官网| 91.成人天堂一区| 亚洲精品日产精品乱码不卡| 国产成人精品综合在线观看| 欧美大片在线观看| 天堂一区二区在线免费观看| 欧美亚洲尤物久久| 亚洲嫩草精品久久| 91老师国产黑色丝袜在线| 欧美国产精品久久| 国产凹凸在线观看一区二区| 久久综合色婷婷| 久久99这里只有精品| 亚洲一区二区三区视频在线播放| 成人开心网精品视频| 久久综合九色综合97婷婷女人| 蜜臀av国产精品久久久久| 欧美久久婷婷综合色| 五月婷婷欧美视频| 正在播放亚洲一区| 日本成人在线一区| 日韩欧美一区二区免费| 免费成人在线观看| 日韩视频一区二区三区| 久久国产精品99精品国产| 日韩欧美国产不卡| 国产盗摄一区二区| 国产精品视频第一区| 91浏览器在线视频| 五月天国产精品| 日韩精品一区在线| 成人一道本在线| 1000部国产精品成人观看| 色哟哟国产精品| 欧美中文字幕一区| 婷婷开心激情综合| 欧美一区二区三区在线观看视频| 久久精品国产澳门| 中文字幕国产精品一区二区| 99久久综合色| 视频在线观看一区二区三区| 精品精品欲导航| 成人精品视频网站| 亚洲国产精品久久艾草纯爱| 日韩欧美www| 成人精品在线视频观看| 亚洲一区二区三区影院| 日韩欧美国产成人一区二区| 国产精品亚洲视频| 亚洲精品水蜜桃| 日韩欧美在线综合网| 国产91在线看| 亚洲va欧美va人人爽| 久久久久综合网| 91成人国产精品| 国产一区福利在线| 亚洲一区在线看| 久久精品夜色噜噜亚洲a∨| 一本色道久久综合狠狠躁的推荐| 视频一区欧美精品| 1000精品久久久久久久久| 欧美一区二视频| 91毛片在线观看| 国产在线播放一区三区四| 一区二区免费看| 久久网站最新地址| 欧美久久久久免费| 91影视在线播放| 精品一区二区三区的国产在线播放| 亚洲欧洲成人精品av97| 日韩欧美电影一区| 欧美性大战久久久久久久| 豆国产96在线|亚洲| 日本va欧美va精品| 亚洲综合色网站| 国产精品久久久久久久久晋中 | 欧美日韩精品一区二区三区| 狠狠色丁香婷综合久久| 在线一区二区观看| 国产成人免费在线观看| 蜜臀av性久久久久蜜臀aⅴ| 亚洲一区二区高清| 综合av第一页| 欧美国产精品v| 26uuu另类欧美| 欧美mv日韩mv| 欧美一二三四在线| 欧美嫩在线观看| 欧美日韩视频在线第一区| 日本伦理一区二区| 91女厕偷拍女厕偷拍高清| 波多野结衣亚洲| 国产成人午夜高潮毛片| 国产一区二区三区四区五区入口 | 欧美日韩免费电影| 一本一本久久a久久精品综合麻豆| 国产精品538一区二区在线| 美脚の诱脚舐め脚责91| 日本中文字幕不卡| 秋霞午夜av一区二区三区| 午夜视黄欧洲亚洲| 亚洲v中文字幕| 日本三级韩国三级欧美三级| 日韩二区在线观看| 久久精工是国产品牌吗| 久久精品99国产精品| 久久69国产一区二区蜜臀| 精品一区二区久久久| 激情国产一区二区 | 欧美tk丨vk视频| xf在线a精品一区二区视频网站| 欧美sm极限捆绑bd| 久久久久久久久蜜桃| 国产亚洲精品7777| 亚洲视频中文字幕| 夜夜操天天操亚洲| 日韩影院在线观看| 精品一区二区三区香蕉蜜桃| 国产综合色视频| 99久久婷婷国产综合精品| 色综合天天综合网国产成人综合天| 色狠狠一区二区| 欧美高清激情brazzers| 欧美不卡一区二区三区四区| 久久久亚洲午夜电影| 日韩理论在线观看| 亚洲国产综合视频在线观看| 美女被吸乳得到大胸91| 成人午夜视频网站| 欧美手机在线视频| 精品处破学生在线二十三| 国产欧美综合色| 亚洲成人7777| 精品亚洲免费视频| 99久久免费视频.com| 91精品国产一区二区三区蜜臀| 2023国产精品自拍| 亚洲黄色小说网站| 激情小说欧美图片| 91看片淫黄大片一级| 精品日韩在线观看| 亚洲日本一区二区| 精品一区二区免费看| 91美女在线观看| 久久在线免费观看| 亚洲免费观看高清完整版在线观看熊 | 7777女厕盗摄久久久| 国产亚洲精品中文字幕| 亚洲大片在线观看| 国产毛片精品国产一区二区三区| 一本色道久久综合精品竹菊| 精品国产sm最大网站免费看| 亚洲视频一区在线观看| 国产一区二区在线电影| 欧美色大人视频| 亚洲三级久久久| 国产成人一级电影| 欧美一区二区二区| 亚洲一区二区三区激情| 99久久免费精品高清特色大片| 欧美一区二区三区四区视频| 亚洲精品日日夜夜| 国产不卡在线视频| 精品福利一区二区三区| 日日欢夜夜爽一区| 欧美在线|欧美| 国产精品色一区二区三区| 国产一区二区三区最好精华液| 欧美日韩一级二级| 一区二区三区四区不卡在线| 成人高清在线视频| 欧美极品aⅴ影院| 国产一区二区三区久久久| 日韩欧美一区二区久久婷婷| 午夜视黄欧洲亚洲| 欧美性生活久久| 亚洲小说欧美激情另类| 色综合久久99| 伊人一区二区三区| av中文一区二区三区| 国产精品短视频| av毛片久久久久**hd| ㊣最新国产の精品bt伙计久久| 成人免费av在线| 亚洲天堂久久久久久久| 9久草视频在线视频精品| 国产精品久久一卡二卡| 99热国产精品|