Ignore:
Timestamp:
Jul 29, 2013, 8:26:31 PM (11 years ago)
Author:
Chillexistence
Message:

Added Ability to Specify the Aspect Ratio for Cropping.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Crop_Image/admin.php

    r22941 r24055  
    139139                $picture['banner_src'] = PHPWG_ROOT_PATH . $picture['path'];
    140140 
     141                list($RatioWidth, $RatioHeight) = getimagesize($picture['path']);
     142       
    141143    $template->assign(array(
    142144                'TITLE' => render_element_name($picture),
     
    145147      'crop' => get_crop_display($picture),
    146148                'image_id' => (int)@$_GET['image_id'],
     149                        'image_ratio' => $RatioWidth/$RatioHeight,
    147150      ));
    148151  }
Note: See TracChangeset for help on using the changeset viewer.