<?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>Zihni Kaya &#187; imagecopyresized</title>
	<atom:link href="http://www.zihni.net/tag/imagecopyresized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zihni.net</link>
	<description></description>
	<lastBuildDate>Wed, 16 Nov 2011 07:22:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>imagecopyresized() Fonksiyonu</title>
		<link>http://www.zihni.net/php/imagecopyresized-fonksiyonu/</link>
		<comments>http://www.zihni.net/php/imagecopyresized-fonksiyonu/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 20:15:54 +0000</pubDate>
		<dc:creator>Zihni</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[imagecopyresized]]></category>

		<guid isPermaLink="false">http://www.zihni.net/?p=58</guid>
		<description><![CDATA[Sözdizimi: 1 bool &#60;strong&#62;&#60;strong&#62;imagecopyresized&#60;/strong&#62;&#60;/strong&#62; &#40; resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h &#41; Resim dosyasını yeniden boyutlandırır ve kopyasını oluşturur. Örnek: 1 2 3 4 5 6 7 8 9 10 11 12 [...]]]></description>
			<content:encoded><![CDATA[<h4>Sözdizimi:</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">bool <span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;&lt;</span>strong<span style="color: #339933;">&gt;</span>imagecopyresized<span style="color: #339933;">&lt;/</span>strong<span style="color: #339933;">&gt;&lt;/</span>strong<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#40;</span> resource <span style="color: #000088;">$dst_image</span> <span style="color: #339933;">,</span> resource <span style="color: #000088;">$src_image</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$dst_x</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$dst_y</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$src_x</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$src_y</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$dst_w</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$dst_h</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$src_w</span> <span style="color: #339933;">,</span> int <span style="color: #000088;">$src_h</span> <span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>Resim dosyasını yeniden boyutlandırır ve kopyasını oluşturur.</p>
<h4>Örnek:</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$fileName</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;test.jpg&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$newName</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;test1.jpg&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$percent</span> <span style="color: #339933;">=</span> <span style="color:#800080;">0.5</span><span style="color: #339933;">;</span>
<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileName</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: image/jpeg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// %50 oranında küçültülmüş yeni boyutları ayarlıyoruz.</span>
<span style="color: #000088;">$newHeight</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$percent</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$newWidth</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$percent</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> imagecreatetruecolor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$newWidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newHeight</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$source</span> <span style="color: #339933;">=</span> imagecreatefromjpeg<span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileName</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// yeniden boyutlandırıyoruz</span>
imagecopyresized<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #339933;">,</span><span style="color: #000088;">$source</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$newWidth</span><span style="color: #339933;">,</span><span style="color: #000088;">$newHeight</span><span style="color: #339933;">,</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span><span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//ekrana yazdırıyoruz</span>
imagejpeg<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.zihni.net/php/imagecopyresized-fonksiyonu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

