Skip to content

Instantly share code, notes, and snippets.

@ronan-gloo
Created July 19, 2012 17:05
Show Gist options
  • Save ronan-gloo/3145365 to your computer and use it in GitHub Desktop.
Save ronan-gloo/3145365 to your computer and use it in GitHub Desktop.
<?php
class Controller_Decode extends Controller {
public function action_iso()
{
$content = file_get_contents(DOCROOT.'files/decode/vins.sql');
$content = utf8_decode($content);
exit($content);
return Response::forge(View::forge('decode/iso', array('content' => $content), false));
}
public function action_colorize()
{
header('Content-type: image/jpeg');
$im = imagecreatefromjpeg(DOCROOT.'maxlion.jpg');
imagefilter($im, IMG_FILTER_GRAYSCALE);
imagefilter($im, IMG_FILTER_CONTRAST, 255);
imagefilter($im, IMG_FILTER_NEGATE);
imagefilter($im, IMG_FILTER_COLORIZE, 55, 157, 18);
imagefilter($im, IMG_FILTER_NEGATE);
return Response::forge(imagejpeg($im));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment