Index: temp/trunk/data/class/SC_Image.php
===================================================================
--- temp/trunk/data/class/SC_Image.php	(revision 9267)
+++ temp/trunk/data/class/SC_Image.php	(revision 9283)
@@ -81,5 +81,5 @@
 		// °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£
 		$uniqname = date("mdHi") . "_" . uniqid("");
-		
+
 		// ¥Õ¥¡¥¤¥ëÌ¾¡¢ÊÝÂ¸ÀèÀßÄê
 		$filename = $uniqname . "." . $extension;
Index: temp/trunk/data/lib/gdthumb.php
===================================================================
--- temp/trunk/data/lib/gdthumb.php	(revision 9276)
+++ temp/trunk/data/lib/gdthumb.php	(revision 9283)
@@ -72,5 +72,5 @@
 	* integer $height
 	*/
-	function Main($path, $width, $height, $dst_file) {
+	function Main($path, $width, $height, $dst_file, $header = false) {
 		
 		if(!isset($path)) {
@@ -126,6 +126,6 @@
 					$dst_im = $imagecreate($re_size[0], $re_size[1]);
 					
-//					$transparent = imagecolortransparent($src_im);
-//					$colorstotal = imagecolorstotal ($src_im);
+					$transparent = imagecolortransparent($src_im);
+					$colorstotal = imagecolorstotal ($src_im);
 					
 					$dst_im = imagecreate($re_size[0], $re_size[1]);
@@ -138,11 +138,27 @@
 
 					if(function_exists("imagegif")) {
-						$dst_file = $dst_file . ".gif";
-						imagegif($dst_im, $dst_file);
+						
+						// ²èÁü½ÐÎÏ
+						if($header){
+							header("Content-Type: image/gif");
+							imagegif($dst_im);
+							return "";
+						}else{
+							$dst_file = $dst_file . ".gif";
+							imagegif($dst_im, $dst_file);
+						}
+						
 						imagedestroy($src_im);
 						imagedestroy($dst_im);
 					} else {
-						$dst_file = $dst_file . ".png";						
-						imagepng($dst_im, $dst_file);
+						// ²èÁü½ÐÎÏ
+						if($header){
+							header("Content-Type: image/png");
+							imagepng($dst_im);
+							return "";
+						}else{
+							$dst_file = $dst_file . ".png";						
+							imagepng($dst_im, $dst_file);
+						}
 						imagedestroy($src_im);
 						imagedestroy($dst_im);
@@ -159,6 +175,14 @@
 					imagestring($dst_im, 5, 10, 10, "GIF $size[0]x$size[1]", $red);
 					imageRectangle ($dst_im, 0, 0, ($re_size[0]-1), ($re_size[1]-1), $black);
-					$dst_file = $dst_file . ".png";
-					imagepng($dst_im, $dst_file);
+					
+					// ²èÁü½ÐÎÏ
+					if($header){
+						header("Content-Type: image/png");
+						imagepng($dst_im);
+						return "";
+					}else{
+						$dst_file = $dst_file . ".png";
+						imagepng($dst_im, $dst_file);
+					}
 					imagedestroy($src_im);
 					imagedestroy($dst_im);
@@ -173,6 +197,14 @@
 				$imageresize( $dst_im, $src_im, 0, 0, 0, 0, $re_size[0], $re_size[1], $size[0], $size[1]);
 				
-				$dst_file = $dst_file . ".jpg";
-				imageJpeg($dst_im, $dst_file);
+				// ²èÁü½ÐÎÏ
+				if($header){
+					header("Content-Type: image/jpeg");
+					imageJpeg($dst_im);
+					return "";
+				}else{
+					$dst_file = $dst_file . ".jpg";
+					imageJpeg($dst_im, $dst_file);
+				}
+				
 				imagedestroy($src_im);
 				imagedestroy($dst_im);
@@ -196,8 +228,15 @@
 					imagecopyresized($dst_im,$src_im, 0, 0, 0, 0, $re_size[0], $re_size[1], $size[0], $size[1]);
 					imagetruecolortopalette($dst_im, false, imagecolorstotal($src_im));
-				}				
-			
-				$dst_file = $dst_file . ".png";
-				imagepng($dst_im, $dst_file);
+				}
+				
+				// ²èÁü½ÐÎÏ
+				if($header){
+					header("Content-Type: image/png");
+					imagepng($dst_im);
+					return "";
+				}else{
+					$dst_file = $dst_file . ".png";
+					imagepng($dst_im, $dst_file);
+				}
 				imagedestroy($src_im);
 				imagedestroy($dst_im);
