diff -r 000000000000 -r d970ebf37754 wp/wp-content/themes/IN-MOTION-package-u1/in-motion/functions/crop.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/functions/crop.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,56 @@ + $original_height ) +{ +$adjusted_width =$original_width / $hm; +$half_width = $adjusted_width / 2; +$int_width = $half_width - $w_height; + +imagecopyresampled($cropped_image_gd ,$original_image_gd ,-$int_width,0,0,0, $adjusted_width, $crop_height, $original_width , $original_height ); +} +elseif(($original_width < $original_height ) || ($original_width == $original_height )) +{ +$adjusted_height = $original_height / $wm; +$half_height = $adjusted_height / 2; +$int_height = $half_height - $h_height; + +imagecopyresampled($cropped_image_gd , $original_image_gd ,0,-$int_height,0,0, $crop_width, $adjusted_height, $original_width , $original_height ); +} +else { + +imagecopyresampled($cropped_image_gd , $original_image_gd ,0,0,0,0, $crop_width, $crop_height, $original_width , $original_height ); +} +imagejpeg($cropped_image_gd); + +?> \ No newline at end of file