<?php
/* SVN FILE: $Id: bg.php 164 2008-04-23 00:36:15Z bb_yujiro $ */
/**
 * 実行処理
 *
 * PHP versions 4 and 5
 *
 *      Hitsuji : Social Network Service <http://rakuto.net/rktSNS/>
 *      Copyright (c) 2007 Yujiro Takahashi
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @package         Hitsuji
 * @copyright       Copyright (c) 2007 Yujiro Takahashi
 * @link            http://rakuto.net/rktSNS/
 * @author          Yujiro Takahashi <yujiro@rakuto.net>
 * @version         $Revision: 164 $
 * @modifiedby      $LastChangedBy: bb_yujiro $
 * @lastmodified    $Date: 2008-04-23 09:36:15 +0900 (豌ｴ, 23 4 2008) $
 * @license         http://opensource.org/licenses/mit-license.php The MIT License
 */

/**
 * 画像の出力
 *
 * @access public
 * @param string $color
 * @return void
 */
function imagePngBg ($color)
{
    $body = getColors($color);
    $back = colorsMultiply($body, RATE_BACK);
    $tile = colorsMultiply($back, RATE_TILE);

    $image = imageCreateFromPNG(dirname(__FILE__).'/../source/bg.png');

    imageColorSet($image, 0, $back['r'], $back['g'], $back['b']);
    imageColorSet($image, 1, $tile['r'], $tile['g'], $tile['b']);

    imagePNG($image);
    imageDestroy($image);
}
?>