Changeset 9132 for temp/trunk/html


Ignore:
Timestamp:
2006/11/27 13:21:42 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/products/product.php

    r9131 r9132  
    548548 
    549549    // ¸µ²èÁü¥µ¥¤¥º¤ò¼èÆÀ 
    550     $src_path = $objUpFile->temp_dir . $objUpFile->temp_file[$arrImageKey[$from_key]]; 
    551     list($src_w, $src_h) = getimagesize($src_path);  
     550    $from_path = $objUpFile->temp_dir . $objUpFile->temp_file[$arrImageKey[$from_key]]; 
     551    list($from_w, $from_h) = getimagesize($from_path); 
     552     
     553    // À¸À®Àè¤Î²èÁü¥µ¥¤¥º¤ò¼èÆÀ 
     554    $to_w = $objUpFile->width[$arrImageKey[$to_key]]; 
     555    $to_h = $objUpFile->height[$arrImageKey[$to_key]]; 
    552556     
    553557    if($objUpFile->temp_file[$arrImageKey[$to_key]] == ""){ 
    554558        // ¸µ²èÁü¤Î¤Û¤¦¤¬Â礭¤¤¾ì¹ç¤Ë¤Ï½Ì¾®Î¨ÀßÄê 
    555         if(NORMAL_IMAGE_WIDTH < $src_w and NORMAL_IMAGE_HEIGHT < $src_h){ 
    556             ($src_w > $src_h) ? $scale = NORMAL_IMAGE_WIDTH / $src_w : $scale = NORMAL_IMAGE_HEIGHT / $src_h; 
     559        if($to_w < $from_w and $to_h < $from_h){ 
     560            ($from_w > $from_h) ? $scale = $to_w / $from_w : $scale = $to_h / $from_h; 
    557561        }else{ 
    558562            $scale = 1; 
Note: See TracChangeset for help on using the changeset viewer.