Skip to content

Instantly share code, notes, and snippets.

View Korko's full-sized avatar

Jérémy Lemesle Korko

View GitHub Profile
@Korko
Korko / resize.php
Created October 9, 2012 12:54
Resize an image from an url and return the new picture
<?php
ob_start("ob_gzhandler");
function loadImage ($file) {
$data = getimagesize($file);
die(var_export($data));
switch($data["mime"]){
case "image/jpeg":
$im = imagecreatefromjpeg($file);