Skip to content

Instantly share code, notes, and snippets.

Rubin Shrestha rbncha

Block or report user

Report or block rbncha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rbncha / image-resize-crop.php
Created Jan 19, 2012
Wordpress Image resize and crop function
View image-resize-crop.php
* This function is used to resize and crop image
* based on width from the center of the image
* creates new image from jpg,gif,png,bmp to png images
function image_resize_crop ( $src, $w, $h, $dest = null, $override = false, $createNewIfExists = false ) {
$ext = array_pop ( explode ('.', $src) );
$filenameSrc = str_replace (".$ext", '', basename($src) );
You can’t perform that action at this time.