Changeset 10570 for trunk/admin/include
- Timestamp:
- Apr 22, 2011, 3:19:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_upload.inc.php
r10563 r10570 605 605 // the image doesn't need any resize! We just copy it to the destination 606 606 copy($source_filepath, $destination_filepath); 607 return true;607 return get_resize_result($source_filepath, $destination_filepath, $resize_dimensions['width'], $resize_dimensions['height'], $starttime, 'GD'); 608 608 } 609 609 … … 647 647 648 648 // everything should be OK if we are here! 649 return array( 650 'source' => $source_filepath, 651 'destination' => $destination_filepath, 652 'width' => $resize_dimensions['width'], 653 'height' => $resize_dimensions['height'], 654 'size' => floor(filesize($destination_filepath) / 1024).' KB', 655 'time' => number_format((get_moment() - $starttime) * 1000, 2, '.', ' ').' ms', 656 'library' => 'GD', 657 ); 649 return get_resize_result($source_filepath, $destination_filepath, $resize_dimensions['width'], $resize_dimensions['height'], $starttime, 'GD'); 658 650 } 659 651 … … 692 684 // the image doesn't need any resize! We just copy it to the destination 693 685 copy($source_filepath, $destination_filepath); 694 return true;686 get_resize_result($source_filepath, $destination_filepath, $resize_dimensions['width'], $resize_dimensions['height'], $starttime, 'ImageMagick'); 695 687 } 696 688 … … 717 709 718 710 // everything should be OK if we are here! 719 return array( 720 'source' => $source_filepath, 721 'destination' => $destination_filepath, 722 'width' => $resize_dimensions['width'], 723 'height' => $resize_dimensions['height'], 724 'size' => floor(filesize($destination_filepath) / 1024).' KB', 725 'time' => number_format((get_moment() - $starttime) * 1000, 2, '.', ' ').' ms', 726 'library' => 'ImageMagick', 727 ); 711 return get_resize_result($source_filepath, $destination_filepath, $resize_dimensions['width'], $resize_dimensions['height'], $starttime, 'ImageMagick'); 728 712 } 729 713 … … 967 951 return $file_path; 968 952 } 953 954 function get_resize_result($source_filepath, $destination_filepath, $width, $height, $time, $library) 955 { 956 return array( 957 'source' => $source_filepath, 958 'destination' => $destination_filepath, 959 'width' => $width, 960 'height' => $height, 961 'size' => floor(filesize($destination_filepath) / 1024).' KB', 962 'time' => number_format((get_moment() - $time) * 1000, 2, '.', ' ').' ms', 963 'library' => $library, 964 ); 965 } 969 966 ?>
Note: See TracChangeset
for help on using the changeset viewer.