Changeset 10563 for trunk/admin/include


Ignore:
Timestamp:
Apr 22, 2011, 1:34:57 PM (13 years ago)
Author:
patdenice
Message:

feature:2274
pwg.images.resize method is able to create or regenerate image from image path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upload.inc.php

    r10552 r10563  
    557557  }
    558558
     559  $starttime = get_moment();
    559560  $gd_info = gd_info();
    560561
     
    646647
    647648  // everything should be OK if we are here!
    648   return true;
     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  );
    649658}
    650659
    651660function pwg_image_resize_im($source_filepath, $destination_filepath, $max_width, $max_height, $quality, $strip_metadata=false, $crop=false, $follow_orientation=true)
    652661{
     662  $starttime = get_moment();
     663
    653664  // extension of the picture filename
    654665  $extension = strtolower(get_extension($source_filepath));
     
    706717
    707718  // everything should be OK if we are here!
    708   return true;
     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  );
    709728}
    710729
Note: See TracChangeset for help on using the changeset viewer.