<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>缩略图 &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/%E7%BC%A9%E7%95%A5%E5%9B%BE/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 12:51:34 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.1</generator>
	<item>
		<title>PHP缩略图函数</title>
		<link>https://www.mudbest.com/php%e7%bc%a9%e7%95%a5%e5%9b%be%e5%87%bd%e6%95%b0/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 18 Mar 2011 15:59:05 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[缩略图]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=488</guid>

					<description><![CDATA[考虑到页面加载速度和页面布局的需要，很多时候要将用户上传的图片进行缩略，下面这个函数分享出来，希望对大家有用。 ... <a title="PHP缩略图函数" class="read-more" href="https://www.mudbest.com/php%e7%bc%a9%e7%95%a5%e5%9b%be%e5%87%bd%e6%95%b0/" aria-label="阅读 PHP缩略图函数">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>考虑到页面加载速度和页面布局的需要，很多时候要将用户上传的图片进行缩略，下面这个函数分享出来，希望对大家有用。<br />
它支持gif、jpg、png和bmp几种图片格式，不过bmp图像需要ImageCreateFromBMP函数支持。</p>
<pre class="brush: php; title: ; notranslate">
/**
 * $srcFile - 图形文件
 * $pixel - 尺寸大小，如：400*300
 * $_quality - 图片质量，默认75
 * $cut - 是否裁剪，默认1，当$cut=0的时候，将不进行裁剪
 * $cache - 如果有缓存，是否直接用缓存，默认true
 * 示例：&quot;&lt; img src=\&quot;&quot;.MiniImg('images/image.jpg','300*180',72,0).&quot;\&quot;&gt;&quot;
 * */
function MiniImg($srcFile, $pixel, $_quality = 75, $cut=1, $cache=true){
	$_type = strtolower(substr(strrchr($srcFile,&quot;.&quot;),1));
	$pixelInfo = explode('*', $pixel);
	$pathInfo = pathinfo($srcFile);
	$_cut = intval($cut);
	$searchFileName = preg_replace(&quot;/\.(&#x5B;A-Za-z0-9]+)$/isU&quot;, &quot;_&quot;.$pixelInfo&#x5B;0].&quot;x&quot;.$pixelInfo&#x5B;1].&quot;_&quot;.$cut.&quot;.\\1&quot;, $pathInfo&#x5B;'basename']);
	$miniFile = $pathInfo&#x5B;'dirname'].'/'.$searchFileName;
	if($cache and file_exists($miniFile)) return $miniFile;
	$data = GetImageSize($srcFile);
	$FuncExists = 1;
	switch ($data&#x5B;2]) {
		case 1:			//gif
			if(function_exists('ImageCreateFromGIF')) $_im = ImageCreateFromGIF($srcFile);
			break;
		case 2:			//jpg
			if(function_exists('imagecreatefromjpeg')) $_im = imagecreatefromjpeg($srcFile);
			break;
		case 3:			//png
			if(function_exists('ImageCreateFromPNG')) $_im = ImageCreateFromPNG($srcFile);  
			break;
		case 6:			//bmp，这里需要用到ImageCreateFromBMP
			$_im = ImageCreateFromBMP($srcFile);  
			break;
	}
	if(!$_im) return $srcFile;
	$sizeInfo&#x5B;'width'] = @imagesx($_im);
	$sizeInfo&#x5B;'height'] = @imagesy($_im);
	if(!$sizeInfo&#x5B;'width'] or !$sizeInfo&#x5B;'height']) return $srcFile;
	if($sizeInfo&#x5B;'width'] == $pixelInfo&#x5B;0] &amp;&amp; $sizeInfo&#x5B;'height'] == $pixelInfo&#x5B;1] ) {
		return $srcFile;
	}elseif($sizeInfo&#x5B;'width'] &lt; $pixelInfo&#x5B;0] &amp;&amp; $sizeInfo&#x5B;'height'] &lt; $pixelInfo&#x5B;1] &amp;&amp; $miniMode=='2'){
		return $srcFile;
	}else{
		$resize_ratio = ($pixelInfo&#x5B;0])/($pixelInfo&#x5B;1]);
		$ratio = ($sizeInfo&#x5B;'width'])/($sizeInfo&#x5B;'height']);
		if($cut==1){
			$newimg = imagecreatetruecolor($pixelInfo&#x5B;0],$pixelInfo&#x5B;1]);
			if($ratio&gt;=$resize_ratio){										//高度优先
				imagecopyresampled($newimg, $_im, 0, 0, 0, 0, $pixelInfo&#x5B;0],$pixelInfo&#x5B;1], (($sizeInfo&#x5B;'height'])*$resize_ratio), $sizeInfo&#x5B;'height']);
				$_result = ImageJpeg ($newimg,$miniFile, $_quality);
			}else{															//宽度优先
				imagecopyresampled($newimg, $_im, 0, 0, 0, 0, $pixelInfo&#x5B;0], $pixelInfo&#x5B;1], $sizeInfo&#x5B;'width'], (($sizeInfo&#x5B;'width'])/$resize_ratio));
				$_result = ImageJpeg ($newimg,$miniFile, $_quality);
			}
		}else{																//不裁图
			if($ratio&gt;=$resize_ratio){
				$newimg = imagecreatetruecolor($pixelInfo&#x5B;0],($pixelInfo&#x5B;0])/$ratio);
				imagecopyresampled($newimg, $_im, 0, 0, 0, 0, $pixelInfo&#x5B;0], ($pixelInfo&#x5B;0])/$ratio, $sizeInfo&#x5B;'width'], $sizeInfo&#x5B;'height']);
				$_result = ImageJpeg ($newimg,$miniFile, $_quality);
			}else{
				$newimg = imagecreatetruecolor(($pixelInfo&#x5B;1])*$ratio,$pixelInfo&#x5B;1]);
				imagecopyresampled($newimg, $_im, 0, 0, 0, 0, ($pixelInfo&#x5B;1])*$ratio, $pixelInfo&#x5B;1], $sizeInfo&#x5B;'width'], $sizeInfo&#x5B;'height']);
				$_result = ImageJpeg ($newimg,$miniFile, $_quality);
			}
		}
		ImageDestroy($_im);
		ImageDestroy($newimg);
		if($_result) return $miniFile;
		return $srcFile;
	}
}
</pre>
<p>以下是ImageCreateFromBMP函数<br />
ImageCreateFromBMP() &#8211; 支持BMP图片函数</p>
<pre class="brush: php; title: ; notranslate">
/**
 * ImageCreateFromBMP() - 支持BMP图片函数
 * $filename - BMP图形文件
 * */
function ImageCreateFromBMP( $filename ) { 
	// Ouverture du fichier en mode binaire 
	if ( ! $f1 = @fopen ($filename, &quot;rb&quot;)) return FALSE ; 
	// 1 : Chargement des ent?tes FICHIER 
	$FILE = unpack ( &quot;vfile_type/Vfile_size/Vreserved/Vbitmap_offset&quot; , fread($f1 ,14)); 
	if ( $FILE &#x5B;'file_type'] != 19778 ) return FALSE ; 
	// 2 : Chargement des ent?tes BMP 
	$BMP = unpack ( 'Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel' . 
			'/Vcompression/Vsize_bitmap/Vhoriz_resolution' . 
			'/Vvert_resolution/Vcolors_used/Vcolors_important' , fread ( $f1 , 40 )); 
	$BMP &#x5B; 'colors' ] = pow ( 2 , $BMP&#x5B;'bits_per_pixel ' ]); 
	if ( $BMP &#x5B;'size_bitmap'] == 0 ) $BMP &#x5B;'size_bitmap']=$FILE &#x5B;'file_size']-$FILE &#x5B;'bitmap_offset']; 
	$BMP &#x5B;'bytes_per_pixel'] = $BMP &#x5B;'bits_per_pixel'] / 8 ; 
	$BMP &#x5B;'bytes_per_pixel2'] = ceil ( $BMP &#x5B;'bytes_per_pixel']); 
	$BMP &#x5B;'decal'] = ( $BMP &#x5B;'width']*$BMP &#x5B;'bytes_per_pixel'] / 4 ); 
	$BMP &#x5B;'decal'] -= floor ( $BMP &#x5B;'width'] * $BMP &#x5B;'bytes_per_pixel'] / 4 ); 
	$BMP &#x5B;'decal'] = 4 - ( 4 * $BMP &#x5B;'decal']); 
	if ( $BMP &#x5B;'decal'] == 4 ) $BMP &#x5B;'decal'] = 0 ; 
	// 3 : Chargement des couleurs de la palette 
	$PALETTE = array (); 
	if ( $BMP &#x5B;'colors'] &lt; 16777216 ){ 
		$PALETTE = unpack ( 'V' . $BMP &#x5B;'colors'] , fread ( $f1 , $BMP &#x5B;'colors'] * 4 )); 
	} 
	// 4 : Cr?ation de l'image 
	$IMG = fread ( $f1 , $BMP &#x5B;'size_bitmap']); 
	$VIDE = chr ( 0 ); 
	$res = imagecreatetruecolor( $BMP &#x5B;'width'] , $BMP &#x5B;'height']); 
	$P = 0 ; 
	$Y = $BMP &#x5B;'height'] - 1 ; 
	while ( $Y &gt;= 0 ){ 
		$X = 0 ; 
		while ( $X &lt; $BMP &#x5B;'width']){ 
			if ( $BMP &#x5B;'bits_per_pixel'] == 24 ) 
				$COLOR = @unpack ( &quot;V&quot; , substr($IMG,$P,3).$VIDE ); 
			elseif ( $BMP&#x5B;'bits_per_pixel']== 16 ){ 
				$COLOR = unpack ( &quot;n&quot; , substr ( $IMG , $P , 2 )); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B; 1 ] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 8 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , $P , 1 )); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B; 1 ] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 4 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , floor ( $P ) , 1 )); 
				if (( $P * 2 ) % 2 == 0 ) 
					$COLOR &#x5B;1] = ( $COLOR &#x5B;1] &gt;&gt; 4 ) ; 
				else 
					$COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x0F ); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B;1] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 1 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , floor ( $P ) , 1 )); 
				if (( $P * 8 ) % 8 == 0 ) $COLOR &#x5B; 1 ] = $COLOR &#x5B; 1 ] &gt;&gt; 7 ; 
				elseif (( $P * 8 ) % 8 == 1 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x40 ) &gt;&gt; 6 ; 
				elseif (( $P * 8 ) % 8 == 2 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x20 ) &gt;&gt; 5 ; 
				elseif (( $P * 8 ) % 8 == 3 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x10 ) &gt;&gt; 4 ; 
				elseif (( $P * 8 ) % 8 == 4 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x8 ) &gt;&gt; 3 ; 
				elseif (( $P * 8 ) % 8 == 5 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x4 ) &gt;&gt; 2 ; 
				elseif (( $P * 8 ) % 8 == 6 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x2 ) &gt;&gt; 1 ; 
				elseif (( $P * 8 ) % 8 == 7 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x1 ); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B;1] + 1 ]; 
			}else return FALSE ; 
			imagesetpixel( $res , $X , $Y , $COLOR &#x5B; 1 ]); 
			$X ++ ; 
			$P += $BMP&#x5B;'bytes_per_pixel']; 
		} 
		$Y -- ; 
		$P += $BMP&#x5B;'decal']; 
	} 
	// Fermeture du fichier 
	fclose ( $f1 ); 
	return $res ; 
} 
</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PHP支持BMP图像函数</title>
		<link>https://www.mudbest.com/php%e6%94%af%e6%8c%81bmp%e5%9b%be%e5%83%8f/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 18 Mar 2011 15:56:28 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[缩略图]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=486</guid>

					<description><![CDATA[在php里的库对bmp格式的图像是不支持的。PHP对于gif、jpg、png等图像文件都有ImageCreat ... <a title="PHP支持BMP图像函数" class="read-more" href="https://www.mudbest.com/php%e6%94%af%e6%8c%81bmp%e5%9b%be%e5%83%8f/" aria-label="阅读 PHP支持BMP图像函数">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p>在php里的库对bmp格式的图像是不支持的。PHP对于gif、jpg、png等图像文件都有ImageCreateFromGIF、imagecreatefromjpeg和ImageCreateFromPNG这些函数支持，下面这个函数就是用于实现类似这些函数的功能的。</p>
<pre class="brush: php; title: ; notranslate">
function ImageCreateFromBMP( $filename ) { 
	// Ouverture du fichier en mode binaire 
	if ( ! $f1 = @fopen ($filename, &quot;rb&quot;)) return FALSE ; 
	// 1 : Chargement des ent?tes FICHIER 
	$FILE = unpack ( &quot;vfile_type/Vfile_size/Vreserved/Vbitmap_offset&quot; , fread($f1 ,14)); 
	if ( $FILE &#x5B;'file_type'] != 19778 ) return FALSE ; 
	// 2 : Chargement des ent?tes BMP 
	$BMP = unpack ( 'Vheader_size/Vwidth/Vheight/vplanes/vbits_per_pixel' . 
			'/Vcompression/Vsize_bitmap/Vhoriz_resolution' . 
			'/Vvert_resolution/Vcolors_used/Vcolors_important' , fread ( $f1 , 40 )); 
	$BMP &#x5B; 'colors' ] = pow ( 2 , $BMP&#x5B;'bits_per_pixel ' ]); 
	if ( $BMP &#x5B;'size_bitmap'] == 0 ) $BMP &#x5B;'size_bitmap']=$FILE &#x5B;'file_size']-$FILE &#x5B;'bitmap_offset']; 
	$BMP &#x5B;'bytes_per_pixel'] = $BMP &#x5B;'bits_per_pixel'] / 8 ; 
	$BMP &#x5B;'bytes_per_pixel2'] = ceil ( $BMP &#x5B;'bytes_per_pixel']); 
	$BMP &#x5B;'decal'] = ( $BMP &#x5B;'width']*$BMP &#x5B;'bytes_per_pixel'] / 4 ); 
	$BMP &#x5B;'decal'] -= floor ( $BMP &#x5B;'width'] * $BMP &#x5B;'bytes_per_pixel'] / 4 ); 
	$BMP &#x5B;'decal'] = 4 - ( 4 * $BMP &#x5B;'decal']); 
	if ( $BMP &#x5B;'decal'] == 4 ) $BMP &#x5B;'decal'] = 0 ; 
	// 3 : Chargement des couleurs de la palette 
	$PALETTE = array (); 
	if ( $BMP &#x5B;'colors'] &lt; 16777216 ){ 
		$PALETTE = unpack ( 'V' . $BMP &#x5B;'colors'] , fread ( $f1 , $BMP &#x5B;'colors'] * 4 )); 
	} 
	// 4 : Cr?ation de l'image 
	$IMG = fread ( $f1 , $BMP &#x5B;'size_bitmap']); 
	$VIDE = chr ( 0 ); 
	$res = imagecreatetruecolor( $BMP &#x5B;'width'] , $BMP &#x5B;'height']); 
	$P = 0 ; 
	$Y = $BMP &#x5B;'height'] - 1 ; 
	while ( $Y &gt;= 0 ){ 
		$X = 0 ; 
		while ( $X &lt; $BMP &#x5B;'width']){ 
			if ( $BMP &#x5B;'bits_per_pixel'] == 24 ) 
				$COLOR = @unpack ( &quot;V&quot; , substr($IMG,$P,3).$VIDE ); 
			elseif ( $BMP&#x5B;'bits_per_pixel']== 16 ){ 
				$COLOR = unpack ( &quot;n&quot; , substr ( $IMG , $P , 2 )); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B; 1 ] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 8 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , $P , 1 )); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B; 1 ] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 4 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , floor ( $P ) , 1 )); 
				if (( $P * 2 ) % 2 == 0 ) 
					$COLOR &#x5B;1] = ( $COLOR &#x5B;1] &gt;&gt; 4 ) ; 
				else 
					$COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x0F ); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B;1] + 1 ]; 
			}elseif ( $BMP&#x5B;'bits_per_pixel']== 1 ){ 
				$COLOR = unpack ( &quot;n&quot; , $VIDE . substr ( $IMG , floor ( $P ) , 1 )); 
				if (( $P * 8 ) % 8 == 0 ) $COLOR &#x5B; 1 ] = $COLOR &#x5B; 1 ] &gt;&gt; 7 ; 
				elseif (( $P * 8 ) % 8 == 1 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x40 ) &gt;&gt; 6 ; 
				elseif (( $P * 8 ) % 8 == 2 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x20 ) &gt;&gt; 5 ; 
				elseif (( $P * 8 ) % 8 == 3 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x10 ) &gt;&gt; 4 ; 
				elseif (( $P * 8 ) % 8 == 4 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x8 ) &gt;&gt; 3 ; 
				elseif (( $P * 8 ) % 8 == 5 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x4 ) &gt;&gt; 2 ; 
				elseif (( $P * 8 ) % 8 == 6 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x2 ) &gt;&gt; 1 ; 
				elseif (( $P * 8 ) % 8 == 7 ) $COLOR &#x5B;1] = ( $COLOR &#x5B;1] &amp; 0x1 ); 
				$COLOR &#x5B;1] = $PALETTE &#x5B; $COLOR &#x5B;1] + 1 ]; 
			}else return FALSE ; 
			imagesetpixel( $res , $X , $Y , $COLOR &#x5B; 1 ]); 
			$X ++ ; 
			$P += $BMP&#x5B;'bytes_per_pixel']; 
		} 
		$Y -- ; 
		$P += $BMP&#x5B;'decal']; 
	} 
	// Fermeture du fichier 
	fclose ( $f1 ); 
	return $res ; 
} 
</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php上传缩略图</title>
		<link>https://www.mudbest.com/php%e4%b8%8a%e4%bc%a0%e7%bc%a9%e7%95%a5%e5%9b%be/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 25 Feb 2011 03:31:52 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[缩略图]]></category>
		<guid isPermaLink="false">http://blog.mudbest.com/?p=421</guid>

					<description><![CDATA[//获得缩略图 function GetDDImage($litpic,$picname,$isremote) ... <a title="php上传缩略图" class="read-more" href="https://www.mudbest.com/php%e4%b8%8a%e4%bc%a0%e7%bc%a9%e7%95%a5%e5%9b%be/" aria-label="阅读 php上传缩略图">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<pre class="brush: php; title: ; notranslate">
//获得缩略图
function GetDDImage($litpic,$picname,$isremote)
{
	global $cuserLogin,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir,$ddcfg_image_dir,$cfg_addon_savetype;
	$ntime = time();
	if( ($litpic != 'none' || $litpic != 'ddfirst') &amp;&amp; 
	 !empty($_FILES&#x5B;$litpic]&#x5B;'tmp_name']) &amp;&amp; is_uploaded_file($_FILES&#x5B;$litpic]&#x5B;'tmp_name']))
	{
		//如果用户自行上传缩略图
		$istype = 0;
		$sparr = Array(&quot;image/pjpeg&quot;,&quot;image/jpeg&quot;,&quot;image/gif&quot;,&quot;image/png&quot;);
		$_FILES&#x5B;$litpic]&#x5B;'type'] = strtolower(trim($_FILES&#x5B;$litpic]&#x5B;'type']));
		if(!in_array($_FILES&#x5B;$litpic]&#x5B;'type'],$sparr))
		{
			ShowMsg(&quot;上传的图片格式错误，请使用JPEG、GIF、PNG格式的其中一种！&quot;,&quot;-1&quot;);
			exit();
		}
		$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime);

		CreateDir($savepath);
		$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis',$ntime).$cuserLogin-&gt;getUserID().mt_rand(1000,9999));
		if(strtolower($_FILES&#x5B;$litpic]&#x5B;'type'])==&quot;image/gif&quot;)
		{
			$fullUrl = $fullUrl.&quot;.gif&quot;;
		}
		else if(strtolower($_FILES&#x5B;$litpic]&#x5B;'type'])==&quot;image/png&quot;)
		{
			$fullUrl = $fullUrl.&quot;.png&quot;;
		}
		else
		{
			$fullUrl = $fullUrl.&quot;.jpg&quot;;
		}

		@move_uploaded_file($_FILES&#x5B;$litpic]&#x5B;'tmp_name'],$cfg_basedir.$fullUrl);
		$litpic = $fullUrl;

		if($GLOBALS&#x5B;'cfg_ddimg_full']=='Y') @ImageResizeNew($cfg_basedir.$fullUrl,$cfg_ddimg_width,$cfg_ddimg_height);
		else @ImageResize($cfg_basedir.$fullUrl,$cfg_ddimg_width,$cfg_ddimg_height);
		
		$img = $cfg_basedir.$litpic;

	}
	else
	{

		$picname = trim($picname);
		if($isremote==1 &amp;&amp; eregi(&quot;^http://&quot;,$picname))
		{
			$litpic = $picname;

			$ddinfos = GetRemoteImage($litpic,$cuserLogin-&gt;getUserID());

			if(!is_array($ddinfos))
			{
				$litpic = '';
			}
			else
			{
				$litpic = $ddinfos&#x5B;0];
				if($ddinfos&#x5B;1] &gt; $cfg_ddimg_width || $ddinfos&#x5B;2] &gt; $cfg_ddimg_height)
				{
					if($GLOBALS&#x5B;'cfg_ddimg_full']=='Y') @ImageResizeNew($cfg_basedir.$litpic,$cfg_ddimg_width,$cfg_ddimg_height);
					else @ImageResize($cfg_basedir.$litpic,$cfg_ddimg_width,$cfg_ddimg_height);
				}
			}
		}
		else
		{
			if($litpic=='ddfirst' &amp;&amp; !eregi(&quot;^http://&quot;,$picname))
			{
				$oldpic = $cfg_basedir.$picname;
				$litpic = str_replace('.','-lp.',$picname);
				if($GLOBALS&#x5B;'cfg_ddimg_full']=='Y') @ImageResizeNew($oldpic,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir.$litpic);
				else @ImageResize($oldpic,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir.$litpic);
				if(!is_file($cfg_basedir.$litpic)) $litpic = '';
			}
			else
			{
				$litpic = $picname;
				return $litpic;
			}
		}
	}
	if($litpic=='litpic' || $litpic=='ddfirst')
	{
		$litpic = '';
	}
	return $litpic;
}
</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
