Location: PHPKode > projects > Energine > energine-2.2/doc/api/energine/image/Image.html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
			<title>Docs For Class Image</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Image</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Класс для работы с изображениями.</p>
		<p class="notes">
			Located in <a class="field" href="_modules---image---components---Image.class.php.html">/modules/image/components/Image.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a20">20</a></span>)
		</p>
		
				
		<pre><a href="../../energine/core/Object.html">Object</a>
   |
   --Image</pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#DEFAULT_MEMORY_LIMIT" title="details" class="const-name">DEFAULT_MEMORY_LIMIT</a> = 					<span class="var-type"> 16777216</span>

				</div>
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#TYPE_GIF" title="details" class="const-name">TYPE_GIF</a> = 					<span class="var-type"> 2</span>

				</div>
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#TYPE_JPEG" title="details" class="const-name">TYPE_JPEG</a> = 					<span class="var-type"> 3</span>

				</div>
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#TYPE_PNG" title="details" class="const-name">TYPE_PNG</a> = 					<span class="var-type"> 1</span>

				</div>
								<div class="const-title">
					<img src="../../media/images/Constant.png" alt=" " />
					<a href="#TYPE_UNKNOWN" title="details" class="const-name">TYPE_UNKNOWN</a> = 					<span class="var-type"> 0</span>

				</div>
							</div>
		</div>
	</div>

	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																								<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$extensions" title="details" class="var-name">$extensions</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">int</span>
					<a href="#$height" title="details" class="var-name">$height</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">resource</span>
					<a href="#$image" title="details" class="var-name">$image</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">int</span>
					<a href="#$type" title="details" class="var-name">$type</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/PrivateVariable.png" alt=" " />
					<span class="var-type">int</span>
					<a href="#$width" title="details" class="var-name">$width</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																							
				<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Destructor.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__destruct" title="details" class="method-name">__destruct</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/PrivateMethod.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#checkAvailableMemory" title="details" class="method-name">checkAvailableMemory</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$width</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$height</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/PrivateMethod.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#convertSizeToBytes" title="details" class="method-name">convertSizeToBytes</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$size</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#create" title="details" class="method-name">create</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$width</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$height</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/PrivateMethod.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#getExtension" title="details" class="method-name">getExtension</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getHeight" title="details" class="method-name">getHeight</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getWidth" title="details" class="method-name">getWidth</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#loadFromFile" title="details" class="method-name">loadFromFile</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::TYPE_UNKNOWN</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#resize" title="details" class="method-name">resize</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$newWidth</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$newHeight</span>, <span class="var-type">boolean</span>&nbsp;<span class="var-name">$stretch</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#saveToFile" title="details" class="method-name">saveToFile</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::TYPE_UNKNOWN</span>])
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$extensions" id="$extensions"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$extensions</span>
			 = <span class="var-default">array(<br />        'png'  =&gt; self::TYPE_PNG,<br />        'gif'  =&gt; self::TYPE_GIF,<br />        'jpg'  =&gt; self::TYPE_JPEG,<br />        'jpe'  =&gt; self::TYPE_JPEG,<br />        'jpeg' =&gt; self::TYPE_JPEG<br />    )</span>			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a57">57</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Сопоставление расширений файлов типам.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$height" id="$height"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$height</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a89">89</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Высота изображения.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$image" id="$image"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">resource</span>
			<span class="var-name">$image</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a73">73</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Изображение.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$type" id="$type"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$type</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a97">97</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Тип изображения (см. выше список типов).</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$width" id="$width"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/PrivateVariable.png" />
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$width</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a81">81</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Ширина изображения.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../../energine/core/Object.html">Object</a></span></p>
					<blockquote>
													<img src="../../media/images/PrivateVariable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../../energine/core/Object.html#var$executionTime">Object::$executionTime</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a107">107</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Конструктор класса.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../energine/core/Object.html#method__construct">Object::__construct()</a></dt>
						<dd>Конструктор класса.</dd>
					</dl>
			
	</div>
<a name="method__destruct" id="__destruct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Destructor.png" />
		<span class="method-title">Destructor __destruct</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a357">357</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__destruct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcheckAvailableMemory" id="checkAvailableMemory"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/PrivateMethod.png" />
		<span class="method-title">checkAvailableMemory</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a132">132</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			checkAvailableMemory
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$width</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$height</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$height</span>			</li>
				</ul>
		
			
	</div>
<a name="methodconvertSizeToBytes" id="convertSizeToBytes"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/PrivateMethod.png" />
		<span class="method-title">convertSizeToBytes</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a149">149</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			convertSizeToBytes
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$size</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$size</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcreate" id="create"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">create</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a119">119</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Создание изображения заданной ширины и высоты.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			create
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$width</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$height</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$width</span><span class="var-description">: - ширина</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$height</span><span class="var-description">: - высота</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetExtension" id="getExtension"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/PrivateMethod.png" />
		<span class="method-title">getExtension</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a353">353</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Возвращает расширение файла.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getExtension
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetHeight" id="getHeight"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getHeight</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a172">172</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getHeight
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetWidth" id="getWidth"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getWidth</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a168">168</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getWidth
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodloadFromFile" id="loadFromFile"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">loadFromFile</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a187">187</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Загружает изображение из файла.</p>
<p class="description"><p>Если тип изображения явно не указан, метод попытается определить его  самостоятельно, основываясь на расширении файла. В случае неудачи  будет возбуждено исключение.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			loadFromFile
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::TYPE_UNKNOWN</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$filename</span><span class="var-description">: - имя файла</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: - тип изображения</span>			</li>
				</ul>
		
			
	</div>
<a name="methodresize" id="resize"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">resize</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a284">284</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Изменяет размер (разрешение) изображения.</p>
<p class="description"><p>Если ширина ИЛИ высота равны null -- они вычисляются пропорционально.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			resize
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$newWidth</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$newHeight</span>, <span class="var-type">boolean</span>&nbsp;<span class="var-name">$stretch</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$newWidth</span><span class="var-description">: - новая ширина</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$newHeight</span><span class="var-description">: - новая высота</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$stretch</span><span class="var-description">: - растягивать изображение на всю площадь &quot;холста&quot; (true),                            или вписывать соблюдая пропорции (false; по-умолчанию)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsaveToFile" id="saveToFile"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">saveToFile</span> (line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a237">237</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Сохраняет изображение в файл.</p>
<p class="description"><p>Если тип изображения явно не указан, метод попытается определить его  самостоятельно, основываясь на расширении файла. В случае неудачи  будет возбуждено исключение.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			saveToFile
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">self::TYPE_UNKNOWN</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$filename</span><span class="var-description">: - имя файла</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: - тип изображения</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../energine/core/Object.html">Object</a></span></p>
					<blockquote>
													<img src="../../media/images/Constructor.png" alt=" "/>
							<span class="method-name"><a href="../../energine/core/Object.html#method__construct">Object::__construct()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../energine/core/Object.html#methodgetExecutionTime">Object::getExecutionTime()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../energine/core/Object.html#methodstartExecutionTimer">Object::startExecutionTimer()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../energine/core/Object.html#methodstopExecutionTimer">Object::stopExecutionTimer()</a></span><br>
											</blockquote>
										
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constDEFAULT_MEMORY_LIMIT" id="DEFAULT_MEMORY_LIMIT"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">DEFAULT_MEMORY_LIMIT</span>
			 = <span class="const-default"> 16777216</span>
			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a27">27</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Количество памяти по умолчанию(если cкомпилировано без memory-limit)</p>
<p class="description"><p>16M</p></p>
	
	
</div>
<a name="constTYPE_GIF" id="TYPE_GIF"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_GIF</span>
			 = <span class="const-default"> 2</span>
			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a43">43</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Graphics Interchange Format</p>
	
	
</div>
<a name="constTYPE_JPEG" id="TYPE_JPEG"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_JPEG</span>
			 = <span class="const-default"> 3</span>
			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a47">47</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Joint Photographic Experts Group</p>
	
	
</div>
<a name="constTYPE_PNG" id="TYPE_PNG"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_PNG</span>
			 = <span class="const-default"> 1</span>
			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a39">39</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Portable Network Graphics</p>
	
	
</div>
<a name="constTYPE_UNKNOWN" id="TYPE_UNKNOWN"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_UNKNOWN</span>
			 = <span class="const-default"> 0</span>
			(line <span class="line-number"><a href="../../__filesource/fsource_energine__modulesimagecomponentsImage.class.php.html#a35">35</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Неизвестный</p>
	
	
</div>
						
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Mon, 17 Sep 2007 13:30:02 +0300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0a2</a>
	</p>
	</div></body>
</html>
Return current item: Energine