Skip to content

Instantly share code, notes, and snippets.

Working from home

Marcos Pereira mvnp

Working from home
Block or report user

Report or block mvnp

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
jasdeepkhalsa / imageCropAdvanced.php
Created Dec 19, 2012 — forked from anonymous/imageCropAdvanced.php
Using PHP and GD to crop an image proportionally according to its aspect ratio. From:
View imageCropAdvanced.php
$image = imagecreatefromjpeg($_GET['src']);
$filename = 'images/cropped_whatever.jpg';
$thumb_width = 200;
$thumb_height = 150;
$width = imagesx($image);
$height = imagesy($image);
You can’t perform that action at this time.