Changeset 12057


Ignore:
Timestamp:
2007/04/02 18:22:47 (17 years ago)
Author:
naka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/lib/gdthumb.php

    r12056 r12057  
    137137                    $imageresize($dst_im, $src_im, 0, 0, 0, 0, $re_size[0], $re_size[1], $size[0], $size[1]); 
    138138 
    139                     if(function_exists("imagegif")) { 
    140                          
     139                    if(function_exists("imagegif")) {                        
    141140                        // ²èÁü½ÐÎÏ 
    142141                        if($header){ 
     
    145144                            return ""; 
    146145                        }else{ 
    147                             $dst_file = $dst_file . ".gif"; 
    148                             imagegif($dst_im, $dst_file); 
    149                         } 
    150                          
     146                            $dst_file = $dst_file . ".gif"; 
     147                            if($re_size[0] == $size[0] && $re_size[1] == $size[1]) { 
     148                                // ¥µ¥¤¥º¤¬Æ±¤¸¾ì¹ç¤Ë¤Ï¡¢¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤¹¤ë¡£(²è¼ÁÎô²½¤òËɤ°¡Ë            
     149                                copy($path, $dst_file); 
     150                            } else { 
     151                                imagegif($dst_im, $dst_file); 
     152                            } 
     153                        }                        
    151154                        imagedestroy($src_im); 
    152155                        imagedestroy($dst_im); 
     
    158161                            return ""; 
    159162                        }else{ 
    160                             $dst_file = $dst_file . ".png";                      
    161                             imagepng($dst_im, $dst_file); 
     163                            $dst_file = $dst_file . ".png"; 
     164                            if($re_size[0] == $size[0] && $re_size[1] == $size[1]) { 
     165                                // ¥µ¥¤¥º¤¬Æ±¤¸¾ì¹ç¤Ë¤Ï¡¢¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤¹¤ë¡£(²è¼ÁÎô²½¤òËɤ°¡Ë            
     166                                copy($path, $dst_file); 
     167                            } else { 
     168                                imagepng($dst_im, $dst_file); 
     169                            } 
    162170                        } 
    163171                        imagedestroy($src_im); 
     
    207215                     
    208216                    if($re_size[0] == $size[0] && $re_size[1] == $size[1]) { 
    209                         // ¥µ¥¤¥º¤¬Æ±¤¸¾ì¹ç¤Ë¤Ï¡¢¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤¹¤ë¡£            
     217                        // ¥µ¥¤¥º¤¬Æ±¤¸¾ì¹ç¤Ë¤Ï¡¢¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤¹¤ë¡£(²è¼ÁÎô²½¤òËɤ°¡Ë        
    210218                        copy($path, $dst_file); 
    211219                    } else { 
     
    247255                }else{ 
    248256                    $dst_file = $dst_file . ".png"; 
    249                     imagepng($dst_im, $dst_file); 
     257                    if($re_size[0] == $size[0] && $re_size[1] == $size[1]) { 
     258                        // ¥µ¥¤¥º¤¬Æ±¤¸¾ì¹ç¤Ë¤Ï¡¢¤½¤Î¤Þ¤Þ¥³¥Ô¡¼¤¹¤ë¡£(²è¼ÁÎô²½¤òËɤ°¡Ë            
     259                        copy($path, $dst_file); 
     260                    } else { 
     261                        imagepng($dst_im, $dst_file); 
     262                    } 
    250263                } 
    251264                imagedestroy($src_im); 
Note: See TracChangeset for help on using the changeset viewer.