<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : [CODE] Square Thumbnails</title>
		<link>https://www.cotonti.com</link>
		<description>Son konu mesajları</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sun, 12 Apr 2026 14:48:55 -0000</pubDate>

		<item>
			<title>Lombi</title>
			<description><![CDATA[Well both. It resizes the shorter axis to your thumb width setting, then crops the longer axis to be the same as the shorter axis. All sites with square thumbs use this algorythm.]]></description>
			<pubDate>Çrş, 27 Mayıs 2009 04:17:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post12852]]></link>
		</item>
		<item>
			<title>pieter</title>
			<description><![CDATA[Is it a resize, or a crop?]]></description>
			<pubDate>Çrş, 27 Mayıs 2009 04:08:02 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post12850]]></link>
		</item>
		<item>
			<title>Lombi</title>
			<description><![CDATA[You replace it with the existing function which is in functions.php]]></description>
			<pubDate>Çrş, 27 Mayıs 2009 03:57:00 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post12849]]></link>
		</item>
		<item>
			<title>DemptD</title>
			<description><![CDATA[Umm, where do i add that?]]></description>
			<pubDate>Çrş, 27 Mayıs 2009 03:52:23 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post12848]]></link>
		</item>
		<item>
			<title>Brock</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=6810#6810">#</a> <strong>simplex :</strong>
Perhaps a &quot;keep aspect ratio&quot; or &quot;square&quot; option should be added into the thumbnail options?<br />
</blockquote>
<br />
Agreed.]]></description>
			<pubDate>Per, 05 Şub 2009 07:41:17 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post6811]]></link>
		</item>
		<item>
			<title>simplex</title>
			<description><![CDATA[Perhaps a &quot;keep aspect ratio&quot; or &quot;square&quot; option should be added into the thumbnail options?]]></description>
			<pubDate>Per, 05 Şub 2009 07:30:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post6810]]></link>
		</item>
		<item>
			<title>Lombi</title>
			<description><![CDATA[Right. But the code is here if they want to use squares :)]]></description>
			<pubDate>Çrş, 06 Ağu 2008 11:21:13 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post127]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[I mean, it depends. Some people want square thumb, some want keep original ratio, etc.]]></description>
			<pubDate>Çrş, 06 Ağu 2008 08:40:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post121]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[It makes for much nicer thumbnails.]]></description>
			<pubDate>Çrş, 06 Ağu 2008 08:01:45 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post120]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[How do you think it could help with the core?]]></description>
			<pubDate>Çrş, 06 Ağu 2008 07:43:23 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post117]]></link>
		</item>
		<item>
			<title>Lombi</title>
			<description><![CDATA[Enjoy :)<br />
<br />
<pre class="code">function sed_createthumb($img_big, $img_small, $small_x, $small_y, $keepratio, $extension, $filen, $fsize, $textcolor, $textsize, $bgcolor, $bordersize, $jpegquality, $dim_priority=&quot;Width&quot;)
        {
        global $cfg;
        $gd_supported = array('jpg', 'jpeg', 'png', 'gif');
 
        switch($extension) {
                case 'gif': $source = imagecreatefromgif($img_big); break;
                case 'png': $source = imagecreatefrompng($img_big); break;
                default: $source = imagecreatefromjpeg($img_big); break;
                }
 
    $thumb_size = $small_x;
	$width = imagesx($source);
	$height = imagesy($source); 
	
    if($width&gt; $height) {
        $x = ceil(($width - $height) / 2 );
        $width = $height;
    } elseif($height&gt; $width) {
        $y = ceil(($height - $width) / 2);
        $height = $width;
    }
 
    $new_im = ImageCreatetruecolor($thumb_size,$thumb_size);
    imagecopyresampled($new_im,$source,0,0,$x,$y,$thumb_size,$thumb_size,$width,$height);
 
        switch($extension)
                {
                case 'gif': imagegif($new_im, $img_small); break;
  				case 'png': imagepng($new_im, $img_small); break;
                default: imagejpeg($new_im, $img_small, $jpegquality); break;
                }
        imagedestroy($new_im);
        imagedestroy($source);
		
        return;
        }</pre>]]></description>
			<pubDate>Sal, 05 Ağu 2008 16:23:36 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=26&d=0#post108]]></link>
		</item>
	</channel>
</rss>