<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Давайте переходить на PNG</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Fri, 10 Apr 2026 17:47:03 -0000</pubDate>

		<item>
			<title>Sergey</title>
			<description><![CDATA[трудно представить куда это вставить, но при изменении размера png картинок в котонти исчезает альфа-канал, ну так я применил  вот такую схему его сохранения:<div style="margin:4px 0px 4px 0px"><input type="button" value="посмотреть" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != '') { this.parentNode.getElementsByTagName('div')[0].style.display = ''; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; }" /><div style="display:none" class="spoiler">
<div class="highlight"><pre class="php">function mobil_createicon($img_big,$ext_img,$path_icon,$icon_height,$jpegquality)
/**
* Открыть файл иконки
* @param string $img_big исходный графический файл без расширения
* @param string $ext_img расширение файла
* @param string $path_icon раздел размещения файла иконки
* @param int $icon_height высота иконки
* @param int $jpegquality JPEG качество(quality)  %
*/
{
//global $cfg;

$file_big=$img_big.'.'.$ext_img;

if (!function_exists('gd_info')) return FALSE;  //есть графическая библиотека?
$img_icon=$path_icon.basename($img_big).'-'.$icon_height.'.'.$ext_img;  //Получить  имя файла иконки
$file_img_icon=$img_icon;
if (file_exists($file_img_icon) and is_readable($file_img_icon)) return $img_icon; //Существует исходный и читабильный файл иконки?
else {if (!(file_exists($file_big) and is_readable($file_big))) return FALSE;} //Существует исходный и читaбильный графический файл?

switch($ext_img)
{
case 'gif':
	{$source = imagecreatefromgif($file_big);
	break;}

	case 'png':
		{$source = imagecreatefrompng($file_big);
		break;}
  	case 'jpg':
   	case 'jpeg':
    	{$source = imagecreatefromjpeg($file_big);
		break;}
	default:
		{ return FALSE; }
}

$big_width = imagesx($source);
$big_height = imagesy($source);
$icon_width=floor($big_width * ($icon_height/$big_height));

if ($cfg&#091;'th_amode'&#093;=='GD1')
	{
	$new = imagecreate($icon_width, $icon_height);
	imagecopyresized($new, $source, 0, 0, 0, 0, $icon_width, $icon_height, $big_width, $big_height);
	}
	else
	{
	$new = imagecreatetruecolor($icon_width, $icon_height);
	imagealphablending($new, FALSE);
	imagesavealpha($new, TRUE);
	imagecopyresampled($new, $source, 0, 0, 0, 0, $icon_width, $icon_height, $big_width, $big_height);
	}

switch($ext_img)
	{
	case 'gif':
		{imagegif($new, $file_img_icon);
		break;}

	case 'png':
		{imagepng($new, $file_img_icon);
		break;}

	default:
		{imagejpeg($new, $file_img_icon, $jpegquality);
		break;}
	}


imagedestroy($new);
imagedestroy($source);
return $img_icon;
}

</pre></div>
</div></div>]]></description>
			<pubDate>Sun, 14 Jun 2009 00:07:05 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post13177]]></link>
		</item>
		<item>
			<title>esclkm</title>
			<description><![CDATA[не соглашусь с новокаином - согласен с кортом.]]></description>
			<pubDate>Sat, 13 Jun 2009 21:14:18 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post13169]]></link>
		</item>
		<item>
			<title>NovoKain</title>
			<description><![CDATA[Графические паки для админки например никто не мешает делать. Какие-то ещё механизмы в ядро на эту тему вводить помоему лишнее.]]></description>
			<pubDate>Fri, 12 Jun 2009 15:23:38 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post13156]]></link>
		</item>
		<item>
			<title>Kort</title>
			<description><![CDATA[Про графику скинов (img/system/) и админку (images/admin/).]]></description>
			<pubDate>Tue, 12 May 2009 13:18:27 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post12400]]></link>
		</item>
		<item>
			<title>Sergeich</title>
			<description><![CDATA[не понял что куда и зачем переходить.]]></description>
			<pubDate>Tue, 12 May 2009 05:48:33 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post12395]]></link>
		</item>
		<item>
			<title>Kort</title>
			<description><![CDATA[Собственно, может и не конкретно на PNG, но какое-то управление расширениями для графики хотелось бы. С вариантами: установка глобального расширения для админка, pfs, системной графики скина или расширения для каждого из них. Возможно, сделать нечто похожее на локализацию: если графический файл отсутствует, использовать дефолтный gif.]]></description>
			<pubDate>Mon, 11 May 2009 16:42:26 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2734&d=0#post12365]]></link>
		</item>
	</channel>
</rss>