이미지가 이렇게 나와요 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

이미지가 이렇게 나와요 정보

이미지가 이렇게 나와요

본문

갤러리형 최신글인데요
사진크기와 소스에서 크기 수정한거하고 같고 퀄리티도 100이나 99로 했는데도 사진과 같이 깨져서 나와요 ㅠㅠ


아래는 소수입니다.
<?
if (!defined("_GNUBOARD_")) exit; // &ecirc;°œ&euml;³„ ?&#732;&igrave;&#157;´&igrave;§? ?‘&ecirc;·¼ &euml;¶&#710;&ecirc;?

$cols  = 1; //  ?´&euml;?&igrave;§? &ecirc;°?&euml;¡œ&ecirc;°&macr;??//  ?´&euml;?&igrave;§? ?¸&euml;¡œ &ecirc;°?&#710;&#732;??&euml;&copy;”&igrave;&#157;¸?&#144;&igrave;„œ &igrave;§???&igrave;´??´&euml;?&igrave;§? ??
$image_h  = 1; // ?´&euml;?&igrave;§? ?&#129;&iacute;•&#732; &ecirc;°„&ecirc;²&copy;
$col_width = (int)(99 / $cols);

$img_width = 467; //?¸&euml;„¤??&ecirc;°?&euml;¡œ&ecirc;¸¸??
$img_height = 132; //?¸&euml;„¤???¸&euml;¡œ&ecirc;¸¸&igrave;&#157;´
$img_quality = 99; //?¼&euml;&brvbar;&not;??100?´&iacute;•&#732;&euml;¡??¤&igrave;&nbsp;• ?¼&euml;? php&euml;²„&igrave;&nbsp;„?&#144;&igrave;„œ??10?´&iacute;•&#732;???&#732;&euml;¡œ &igrave;²&#732;&euml;&brvbar;&not; ?????&#710;&igrave;‚¼

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 ?´&igrave;&#402;&#129; &euml;²„&igrave;&nbsp;„???¤&igrave;¹&#732;?&#732;&igrave;–´ ?&#710;&igrave;–´???&not;&igrave;&#353;&copy;?????&#710;&euml;&#352;” &ecirc;°¤&euml;&#376;&not;&euml;&brvbar;?&ecirc;²Œ&igrave;‹œ???…&euml;‹&#710;??");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_img_list'; //?¸&euml;„¤???´&euml;?&igrave;§? ?&#157;&igrave;„± ?”&euml;&nbsp;‰?&nbsp;&euml;&brvbar;&not;

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

?>
                          <table width="467" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td height="18" class="Blueb" style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;" width="133">
<span style="font-size:8pt;"><b>Story</b></span></td>
        <td width="334" height="18" style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;"> <p align="right"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/aa.gif" width="46" height="13" border="0"></a> </tr>
<tr>
<td height="2" colspan="2"></td>
</tr>
<tr>
<td height="3" colspan="2"></td>
</tr>
</table>

<? for ($i=0; $i<count($list); $i++) { ?>
<?
$wr_content = "<a href='{$list[$i]['href']}'>".cut_str(strip_tags($list[$i]['wr_content']), 500, '...')."</a>";
 //  if ($i>0 && $i%$cols==0) { echo "<td colspan='$cols' height='$image_h'></td><tr>"; }
    $img = "<img src='$g4_path/img/noimage.gif' border=1 width='$img_width' height='$img_height' title='?´&euml;?&igrave;§? ?†&igrave;&#157;Œ' align=left style='margin-right:5px; border:1 #FFFFF solid;'>";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];


// ?&not;&euml;„¤?¼&ecirc;³¼ ?&#710;&euml;¡œ ?&not;&euml;&brvbar;°?Œ&igrave;&#157;¼ ?&nbsp;&igrave;§œ&euml;&yen;?&euml;¹„&ecirc;&micro;&#144;?&#732;&igrave;—&not; ?&#710;&euml;„¤?¼&igrave;&#157;„ &ecirc;°±&igrave;‹&nbsp;?&#732;&ecirc;¸°?„&iacute;•´??&igrave;§??´&euml;‹¤.
if ( file_exists($thumb) && (filemtime($thumb) < filemtime($list[$i][file][0][path] .'/'. $list[$i][file][0][file])) ) {
@unlink($thumb);
}

    // ?¸&euml;„¤???´&euml;?&igrave;§?&ecirc;°? &igrave;¡´&igrave;&#158;&not;?&#732;&igrave;? ?&#352;&euml;&#352;”?¤&euml;&copy;´
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // ?…&euml;¡œ?œ&euml;&#144;œ ?Œ&igrave;&#157;¼???´&euml;?&igrave;§??¼&euml;&copy;´
//echo $i;
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);
$width = (int)($size[0] * $rate);

            // &ecirc;³„&igrave;‚°???¸&euml;„¤???´&euml;?&igrave;§????’&igrave;&#157;´&ecirc;°? ?¤&igrave;&nbsp;•???´&euml;?&igrave;§????’&igrave;&#157;´&euml;³´&euml;‹¤ ?‘&euml;‹¤&euml;&copy;?
            $dst = imagecreatetruecolor($img_width, $img_height);

            if ($height < $img_height) {                // &ecirc;³„&igrave;‚°???´&euml;?&igrave;§? ?’&igrave;&#157;´&euml;¡?&euml;³&micro;&igrave;‚&not;&euml;³??´&euml;?&igrave;§? ?&#157;&igrave;„±
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $img_height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
            } else {  // ?¤&igrave;&nbsp;•???´&euml;?&igrave;§? ?’&igrave;&#157;´&euml;¡?&euml;³&micro;&igrave;‚&not;&euml;³??´&euml;?&igrave;§? ?&#157;&igrave;„±
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);

}
//echo $i;
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }

    if (file_exists($thumb))
 $img = "<img src='$thumb' $img_quality=100 width=467 height=132 border=0>";

?>
<?
        $datetime = substr($list[$i][wr_datetime],0,10);
        $datetime2 = $list[$i][wr_datetime];
       
        if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";

        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);

    $list[$i][datetime] = $datetime;
    $list[$i][datetime2] = $datetime2;
   
    $a[$i] = array(
      "wr_date"=>$datetime2,
);
?>


<?
 $rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
 $a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
 $a_img="<a href='{$list[$i][href]}'>$img</a>";
 $a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
 $rw_content = cut_str(stripslashes($list[$i][wr_content]),$content_size,' ..more');
 $rw_content = strip_tags($rw_content);
?>                                                       

  <table width="467" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" height="116"><table width="95%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="1245" valign="top">
                        <table width="100%" border="0" cellpadding="2" cellspacing="1">
                            <tr>
                                <td bgcolor="#FFFFFF"><?=$a_img?></td>
          </tr>
        </table>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="font-weight:bold; color:black;">
&nbsp;<b><span style="font-weight:bold; color:black; background-color:white;"><?
            echo "<a href='{$list[$i]['href']}'  class=\"b\">";
            echo "<font style='font-family:??; font-size:9pt; color:#333333;'>{$list[$i]['subject']}";
            echo "</a>";
?>
</span></b></td>
          </tr>
                            <tr>
                                <td height="3"></td>
          </tr>
                            <tr>
                                <td style="border-bottom-width:1; border-bottom-color:rgb(204,204,204); border-bottom-style:solid;" height="26" valign="top">&nbsp;<?=$wr_content?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
</tr><td height="10"></td>
</table>
                                                                         
                                          <?
}
?>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로