Sha256: c298a505f8e8e09dc4aef198b4ca8890d91db5da9361d6257520a4d80091c2a2
Contents?: true
Size: 537 Bytes
Versions: 11
Compression:
Stored size: 537 Bytes
Contents
<?php /** * Simple, very basic image cropper for CropNResize plugin demonstration * @author Clemens Prerovsky */ header('Content-type: image/jpeg'); // load parameters from url $src = $_GET["src"]; $x = intval($_GET["x"]); $y = intval($_GET["y"]); $w = intval($_GET["w"]); $h = intval($_GET["h"]); // resize image $img = imagecreatefromjpeg($src) or die("Error: unknown src"); $cropped = imagecreatetruecolor($w, $h); imagecopyresampled($cropped, $img, 0, 0, $x, $y, $w, $h, $w, $h); imagejpeg($cropped); imagedestroy($cropped); ?>
Version data entries
11 entries across 11 versions & 4 rubygems