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

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

?? image_processing.php

?? php網頁設計
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?# Image processing functions# Functions to allow upload and resizing of imagesif (!function_exists("upload_file")){function upload_file($ref)	{	# Process file upload for resource $ref		# Work out which file has been posted (switch is necessary for SWFUpload)	if (isset($_FILES['userfile'])) {$processfile=$_FILES['userfile'];} else {$processfile=$_FILES['Filedata'];}	    $filename=strtolower(str_replace(" ","_",$processfile['name']));        # Work out extension    $extension=explode(".",$filename);$extension=trim(strtolower($extension[count($extension)-1]));        $status="Please provide a file name.";    $filepath=get_resource_path($ref,"",true,$extension);    if ($filename!="")    	{	    $result=move_uploaded_file($processfile['tmp_name'], $filepath);    	if ($result==false)       	 	{       	 	$status="File upload error. Please check the size of the file you are trying to upload.";       	 	}     	else     		{     		chmod($filepath,0777);			$status="Your file has been uploaded.";    	 	}    	}    	    # Store extension in the database    sql_query("update resource set file_extension='$extension',preview_extension='$extension' where ref='$ref'");	# Store original filename in field, if set	global $filename_field;	if (isset($filename_field))		{		update_field($ref,$filename_field,$filename);		}        # Clear any existing FLV file or multi-page previews.	global $pdf_pages;	for ($n=2;$n<=$pdf_pages;$n++)		{		# Remove preview page.		$path=get_resource_path($ref,"scr",false,"jpg",-1,$n,false);		if (file_exists($path)) {unlink($path);}		# Also try the watermarked version.		$path=get_resource_path($ref,"scr",false,"jpg",-1,$n,true);		if (file_exists($path)) {unlink($path);}		}	# Remove any FLV video preview (except if the actual resource is an FLV file).	if ($extension!="flv")		{		$path=get_resource_path($ref,"",false,"flv");		if (file_exists($path)) {unlink($path);}		}    	# Create previews	create_previews($ref,false,$extension);    return $status;    }}	function extract_exif_comment($ref,$extension)	{	# Extract the EXIF comment from either the ImageDescription field or the UserComment	# Also parse IPTC headers and insert		# EXIF headers	$image=get_resource_path($ref,"",false,$extension);	if (!file_exists($image)) {return false;}global $exiftool_path;if (isset($exiftool_path))	{	if (file_exists(stripslashes($exiftool_path) . "/exiftool"))		{			#creating the exiftool command which will output the metadata array			$command=$exiftool_path."/exiftool -p ' (";						$read_from=get_exiftool_fields();			for($i=0;$i< count($read_from);$i++)				{				$field=explode(",",$read_from[$i]['exiftool_field']);				foreach ($field as $field){				$command.="\"$".$field."\", " ;}				}							#-f and -m force empty output ("-") and avoid error messages				#-ScanforXMP allows tags to be extracted for unrecognized filetypes (INDD)			#-fast avoids ScanforXMP if the filetype is a known one			$command.=")' -f -m -ScanforXMP -fast $image";			$metadata=shell_exec($command);						if(isset($metadata)){			#the printed output is evaluated into a php array			eval('$'.'metadata_array=array'.$metadata.';');				#this is a rather complex double loop to account for the one-to-many relationship						#j increases as all the read_from values are exhausted, so it allows 			#us to use all the values in the metadata array			$j=0;				for($i=0;$i< count($read_from);$i++)				{				$field=explode(",",$read_from[$i]['exiftool_field']);							foreach ($field as $field){						#notice if two different values get mapped to the same field, the last one will be the winner				#but if a previous field has a value and a subsequent field is empty, 				#the one with the value should get entered into the database.				#files that have come from RS will have the same value for each anyway.				if (($metadata_array[$j]!="-") && ($metadata_array[$j]!="")){update_field($ref,$read_from[$i]['ref'],$metadata_array[$j]);}				$j++;}				}			}		}	}else{	$data=@exif_read_data($image);	if ($data!==false)		{		$comment="";		#echo "<pre>EXIF\n";print_r($data);exit();		if (isset($data["ImageDescription"])) {$comment=$data["ImageDescription"];}		if (($comment=="") && (isset($data["COMPUTED"]["UserComment"]))) {$comment=$data["COMPUTED"]["UserComment"];}		if ($comment!="")			{			# Convert to UTF-8			$comment=iptc_return_utf8($comment);						# Save comment			global $exif_comment;			update_field($ref,$exif_comment,$comment);			}		if (isset($data["Model"]))			{			# Save camera make/model			global $exif_model;			update_field($ref,$exif_model,$data["Model"]);			}		if (isset($data["DateTimeOriginal"]))			{			# Save camera date/time			global $exif_date;			$date=$data["DateTimeOriginal"];			# Reformat date to ISO standard			$date=substr($date,0,4) . "-" . substr($date,5,2) . "-" . substr($date,8);			update_field($ref,$exif_date,$date);			}		}			# Try IPTC headers	$size = getimagesize($image, $info);	if (isset($info["APP13"]))		{		$iptc = iptcparse($info["APP13"]);		#echo "<pre>IPTC\n";print_r($iptc);exit();		# Look for iptc fields, and insert.		$fields=sql_query("select * from resource_type_field where length(iptc_equiv)>0");		for ($n=0;$n<count($fields);$n++)			{			$iptc_equiv=$fields[$n]["iptc_equiv"];			if (isset($iptc[$iptc_equiv][0]))				{				# Found the field				if (count($iptc[$iptc_equiv])>1)					{					# Multiple values (keywords)					$value="";					for ($m=0;$m<count($iptc[$iptc_equiv]);$m++)						{						if ($m>0) {$value.=", ";}						$value.=$iptc[$iptc_equiv][$m];						}					}				else					{					$value=$iptc[$iptc_equiv][0];					}									$value=iptc_return_utf8($value);								# Date parsing				if ($fields[$n]["type"]==4)					{					$value=substr($value,0,4) . "-" . substr($value,4,2) . "-" . substr($value,6,2);					}								if (trim($value)!="") {update_field($ref,$fields[$n]["ref"],$value);}				}						}		}	}	}function iptc_return_utf8($text)	{	# For the given $text, return the utf-8 equiv.	# Used for iptc headers to auto-detect the character encoding.	global $iptc_expectedchars;		# No inconv library? Return text as-is	if (!function_exists("iconv")) {return $text;}		$try=array("UTF-8","ISO-8859-1","Macintosh","Windows-1252");	for ($n=0;$n<count($try);$n++)		{		if ($try[$n]=="UTF-8") {$trans=$text;} else {$trans=@iconv($try[$n], "UTF-8", $text);}		for ($m=0;$m<strlen($iptc_expectedchars);$m++)			{			if (strpos($trans,substr($iptc_expectedchars,$m,1))!==false) {return $trans;}			}		}	return $text;	}	function create_previews($ref,$thumbonly=false,$extension="jpg")	{	# Always create file checksum (all types)	generate_file_checksum($ref,$extension);	if (($extension=="jpg") || ($extension=="jpeg") || ($extension=="png") || ($extension=="gif")) 	# Create image previews for built-in supported file types only (JPEG, PNG, GIF)		{		# For resource $ref, (re)create the various preview sizes listed in the table preview_sizes		# Only create previews where the target size IS LESS THAN OR EQUAL TO the source size.		# Set thumbonly=true to (re)generate thumbnails only.		$file=get_resource_path($ref,"",false,$extension);			# fetch source image size, if we fail, exit this function (file not an image, or file not a valid jpg/png/gif).		if ((list($sw,$sh) = @getimagesize($file))===false) {return false;}				$ps=sql_query("select * from preview_size" . (($thumbonly)?" where id='thm' or id='col'":""));		for ($n=0;$n<count($ps);$n++)			{			# fetch target width and height			$tw=$ps[$n]["width"];$th=$ps[$n]["height"];			$id=$ps[$n]["id"];						# Find the target path and delete anything that's already there.			$path=get_resource_path($ref,$ps[$n]["id"],false);			if (file_exists($path)) {unlink($path);}			# Also try the watermarked version.			$wpath=get_resource_path($ref,$ps[$n]["id"],false,"jpg",-1,1,true);			if (file_exists($wpath)) {unlink($wpath);}            # only create previews where the target size IS LESS THAN OR EQUAL TO the source size.			# or when producing a small thumbnail (to make sure we have that as a minimum			if (($sw>$tw) || ($sh>$th) || ($id=="thm") || ($id=="col"))				{				# Calculate width and height.				if ($sw>$sh) {$ratio = ($tw / $sw);} # Landscape				else {$ratio = ($th / $sh);} # Portrait				$tw=floor($sw*$ratio);				$th=floor($sh*$ratio);				global $imagemagick_path,$imagemagick_preserve_profiles,$imagemagick_quality;				if (isset($imagemagick_path))					{					# ----------------------------------------					# Use ImageMagick to perform the resize					# ----------------------------------------						# Locate imagemagick.				    $command=$imagemagick_path . "/bin/convert";				    if (!file_exists($command)) {$command=$imagemagick_path . "/convert";}				    if (!file_exists($command)) {$command=$imagemagick_path . "\convert.exe";}                    if (!file_exists($command)) {exit("Could not find ImageMagick 'convert' utility.'");}	        					# Preserve colour profiles? (omit for smaller sizes)   					$profile="+profile icc +profile xmp +profile exif +profile iptc -colorspace RGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)					if ($imagemagick_preserve_profiles && $id!="thm" && $id!="col" && $id!="pre" && $id!="scr") {$profile="";}    				    $command2 = $command . " \"$file\"[0] $profile -quality $imagemagick_quality -resize " . $tw . "x" . $th . " \"$path\"";                     $output=shell_exec($command2); 					if ($id=="thm")						{						# For the thumbnail image, call extract_mean_colour() to save the colour/size information						$target=@imagecreatefromjpeg($path);						extract_mean_colour($target,$ref);						}	   				# Add a watermarked image too?    				global $watermark;    				if (isset($watermark) && ($ps[$n]["internal"]==1 || $ps[$n]["allow_preview"]==1))    					{						$path=myrealpath(get_resource_path($ref,$ps[$n]["id"],false,"",-1,1,true));						if (file_exists($path)) {unlink($path);}	    				$watermarkreal=myrealpath($watermark);					    $command2 = $command . " \"$file\"[0] $profile -quality $imagemagick_quality -resize " . $tw . "x" . $th . " -tile $watermarkreal -draw \"rectangle 0,0 $tw,$th\" \"$path\""; 					    $output=shell_exec($command2); 						}					}				else								{					# ----------------------------------------					# Use the GD library to perform the resize					# ----------------------------------------										$target = imagecreatetruecolor($tw,$th);										if ($extension=="png")						{						$source = @imagecreatefrompng($file);						if ($source===false) {return false;}						}					elseif ($extension=="gif")						{						$source = @imagecreatefromgif($file);						if ($source===false) {return false;}						}					else						{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日夜夜免费精品视频| 中文字幕的久久| 99re这里只有精品视频首页| 国产一区欧美一区| 男女性色大片免费观看一区二区 | 天天色图综合网| 亚洲精品成人少妇| 洋洋成人永久网站入口| 亚洲一区二区三区四区在线| 亚洲精品伦理在线| 午夜一区二区三区视频| 99在线热播精品免费| 国产宾馆实践打屁股91| 成人美女在线观看| 91精品办公室少妇高潮对白| 欧美视频中文字幕| 91精品欧美一区二区三区综合在| 91精品福利在线一区二区三区| 91精品国产91综合久久蜜臀| 精品成人在线观看| 国产精品久久久久久久裸模| 尤物av一区二区| 亚洲国产一区二区在线播放| 免费成人小视频| 高清国产午夜精品久久久久久| 成人av电影在线网| 欧洲视频一区二区| 日韩免费看的电影| 自拍视频在线观看一区二区| 午夜婷婷国产麻豆精品| 国产一区二区三区在线观看免费视频 | 91麻豆精品国产无毒不卡在线观看| 欧美精品v日韩精品v韩国精品v| 欧美mv日韩mv国产网站| 国产精品青草久久| 天涯成人国产亚洲精品一区av| 激情五月婷婷综合网| 97久久超碰精品国产| 欧美一区二区播放| 亚洲欧洲另类国产综合| 日韩精品亚洲一区| 波多野结衣欧美| 欧美成人免费网站| 一区二区三区波多野结衣在线观看| 蜜桃视频在线观看一区| 9久草视频在线视频精品| 在线综合视频播放| 亚洲免费av高清| 韩国成人精品a∨在线观看| 在线观看一区二区视频| 国产午夜精品久久久久久免费视| 亚洲成国产人片在线观看| 成人性生交大片| 91精品欧美久久久久久动漫| 亚洲日本在线看| 国产精品一二三四| 欧美电影免费提供在线观看| 亚洲一卡二卡三卡四卡五卡| 国产成人精品亚洲777人妖| 欧美精品第1页| 一区二区日韩电影| 暴力调教一区二区三区| 久久久久久99久久久精品网站| 午夜视频在线观看一区| 在线观看区一区二| 亚洲日本一区二区| 北条麻妃国产九九精品视频| 欧美激情资源网| 韩日av一区二区| 日韩午夜电影av| 日韩黄色在线观看| 欧美少妇xxx| 亚洲一区二区视频在线观看| 91视频在线观看| 日韩一区在线看| 91在线国内视频| 韩日精品视频一区| 久久亚区不卡日本| 狠狠v欧美v日韩v亚洲ⅴ| 91精品国产高清一区二区三区| 亚洲福利视频一区| 欧美影院午夜播放| 亚洲mv大片欧洲mv大片精品| 欧美日韩一区在线| 日本午夜一本久久久综合| 6080国产精品一区二区| 日韩中文字幕av电影| 91精品国产综合久久香蕉的特点 | 日韩精品中文字幕在线不卡尤物 | 麻豆成人免费电影| 欧美va亚洲va在线观看蝴蝶网| 热久久国产精品| 日韩欧美一区中文| 精品一区二区三区av| 久久久久久久综合| 97se亚洲国产综合自在线不卡| 亚洲私人黄色宅男| 日本高清免费不卡视频| 亚洲国产wwwccc36天堂| 91精品国产福利在线观看| 韩日欧美一区二区三区| 日韩码欧中文字| 国产精品久久久久久久久久免费看| 国产精品羞羞答答xxdd| 综合久久给合久久狠狠狠97色| 在线精品视频免费播放| 美女网站视频久久| 亚洲欧洲一区二区三区| 在线电影院国产精品| 国产99久久精品| 亚洲精品国产精品乱码不99| 日韩欧美成人一区二区| 成人精品免费视频| 天天色综合成人网| 国产精品久久久久久久久免费相片| 在线观看日韩一区| 国产一区二区影院| 亚洲成人av电影在线| 国产日本一区二区| 欧美日韩一区二区欧美激情| 国产成人免费视频| 天天操天天干天天综合网| 日本一区二区视频在线| 91精品国产高清一区二区三区| 成av人片一区二区| 国内精品国产成人| 亚洲第一狼人社区| 自拍偷拍亚洲欧美日韩| 欧美va亚洲va| 欧美精品777| 972aa.com艺术欧美| 国产麻豆日韩欧美久久| 午夜精品一区二区三区免费视频| 国产精品欧美经典| 欧美草草影院在线视频| 欧美日韩亚洲综合在线 | 欧美网站一区二区| 不卡一区二区中文字幕| 国产一区二区三区日韩| 日本系列欧美系列| 亚洲午夜羞羞片| 亚洲欧美日本韩国| 国产精品不卡一区二区三区| 26uuu国产日韩综合| 制服丝袜一区二区三区| 色成人在线视频| 91免费国产在线| 99久久精品免费精品国产| 国产成人aaaa| 国产尤物一区二区| 激情六月婷婷久久| 精品夜夜嗨av一区二区三区| 青青草成人在线观看| 丝袜美腿成人在线| 免费看日韩a级影片| 免费看欧美女人艹b| 蜜桃av一区二区| 国产一区二区中文字幕| 精品一区二区三区在线观看国产| 麻豆精品视频在线| 精品午夜久久福利影院| 激情综合色播五月| 国产一区二区三区久久久| 国产一区免费电影| 福利电影一区二区| 91亚洲精品久久久蜜桃| 色综合久久久久网| 欧美天堂亚洲电影院在线播放| 欧美性一区二区| 欧美一区二区视频在线观看2020| 91精品国产综合久久蜜臀| 欧美电视剧在线看免费| 国产目拍亚洲精品99久久精品| 国产精品久久久一区麻豆最新章节| 欧美激情一区在线| 亚洲人成精品久久久久久| 亚洲自拍偷拍欧美| 美女一区二区视频| zzijzzij亚洲日本少妇熟睡| 日本丶国产丶欧美色综合| 欧美日韩久久一区二区| 精品国产一二三| 亚洲欧洲色图综合| 日本欧美一区二区| 国产成人免费在线观看| 91精品福利视频| 精品少妇一区二区三区在线播放| 久久精品日产第一区二区三区高清版| 国产精品欧美一区喷水| 亚洲电影视频在线| 国产精品系列在线观看| 欧美自拍丝袜亚洲| 久久久久国产精品麻豆| 一区二区三区四区国产精品| 久久99九九99精品| 日本韩国欧美国产| 国产日韩av一区| 日本中文在线一区| 色综合久久久网| 久久久青草青青国产亚洲免观|